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

VariaModel should have a method_missing mode #26

Closed
ivey opened this issue May 23, 2013 · 2 comments
Closed

VariaModel should have a method_missing mode #26

ivey opened this issue May 23, 2013 · 2 comments

Comments

@ivey
Copy link

ivey commented May 23, 2013

Sometimes I want a config object that validates many of the options, but may also allow arbitrary options to be set.

If such a VariaModel were put into method missing mode, then model.unknown_attr="foo" would set @attributes[:unknown_attr] to "foo", without any validation.

@reset
Copy link
Owner

reset commented May 23, 2013

@ivey does carefree assignment mode take care of this for you? https://github.com/reset/chozo/blob/master/lib/chozo/varia_model.rb#L25-L27

@ivey
Copy link
Author

ivey commented May 25, 2013

Yeah it's close enough.

@ivey ivey closed this as completed May 25, 2013
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

2 participants