Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default lambdas should pass in the object #21

Open
mustmodify opened this issue Aug 12, 2015 · 1 comment
Open

default lambdas should pass in the object #21

mustmodify opened this issue Aug 12, 2015 · 1 comment

Comments

@mustmodify
Copy link
Owner

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant