Module: Reaction::HasParams::ClassMethods

Defined in:
lib/reaction/has_params.rb

Instance Method Summary collapse

Instance Method Details

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



12
13
14
15
# File 'lib/reaction/has_params.rb', line 12

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

#param_settable?(name) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/reaction/has_params.rb', line 17

def param_settable?(name)
  !type(name).nil?
end