valuable icon indicating copy to clipboard operation
valuable copied to clipboard

default lambdas should pass in the object

Open mustmodify opened this issue 10 years ago • 1 comments

class Person < Valuable
  has_value :first_name
  has_value :last_name
  has_value :initials, :default => {|person| person.first_name[0] + person.last_name[0] } # needs some nil checking
end

mustmodify avatar Aug 12 '15 19:08 mustmodify

@andrewcsmith wants :lazy => true to run on demand rather than on init

mustmodify avatar Aug 12 '15 19:08 mustmodify