mustmodify / valuable

quick ruby modeling -- basically attr_accessor with default values, light-weight casting, and a constructor
http://valuable.mustmodify.com/
MIT License
72 stars 3 forks source link

default lambdas should pass in the object #21

Open mustmodify opened 8 years ago

mustmodify commented 8 years ago
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 commented 8 years ago

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