Module: Reaction::HasParams::ClassMethods
- Defined in:
- lib/reaction/has_params.rb
Instance Method Summary collapse
- #param(name, options = {}) ⇒ Object
- #param_settable?(name) ⇒ Boolean
- #validates(name, options = {}) ⇒ Object
Instance Method Details
#param(name, options = {}) ⇒ Object
29 30 31 |
# File 'lib/reaction/has_params.rb', line 29 def param(name, = {}) set_type(name, .delete(:type) || RawType, ) end |
#param_settable?(name) ⇒ Boolean
33 34 35 |
# File 'lib/reaction/has_params.rb', line 33 def param_settable?(name) !type(name).nil? end |
#validates(name, options = {}) ⇒ Object
37 38 39 |
# File 'lib/reaction/has_params.rb', line 37 def validates(name, = {}) set_validators(name, ) end |