gunn / ember-auto

Nicer computed properties - less this.get("myField")
43 stars 2 forks source link

Arguments as object #5

Open ReyAyanami opened 9 years ago

ReyAyanami commented 9 years ago
gravatarUrl: function(email, size) {
  return 'http://www.gravatar.com/avatar/' + hex_md5(email) + '?s=' + size;
}.auto("email", "size")

to

gravatarUrl: function({email, size}) {
  return 'http://www.gravatar.com/avatar/' + hex_md5(email) + '?s=' + size;
}.auto("email", "size")

here you can use arguments in any order and exclude some when you observe but don't use property