Module: Reaction::HasParams::ClassMethods

Defined in:
lib/reaction/has_params.rb

Instance Method Summary collapse

Instance Method Details

#param(name, options = {}) ⇒ Object



29
30
31
# File 'lib/reaction/has_params.rb', line 29

def param(name, options = {})
  set_type(name, options.delete(:type) || RawType, options)
end

#param_settable?(name) ⇒ Boolean

Returns:

  • (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, options = {})
  set_validators(name, options)
end