module Parameters::ModuleMethods
Public Instance Methods
extended(object)
click to toggle source
Ensures that the module will initialize parameters, when extended into an Object
.
# File lib/parameters/module_methods.rb, line 22 def extended(object) each_param do |param| object.params[param.name] = param.to_instance(object) end end
included(base)
click to toggle source
Ensures that the module will re-extend Parameters::ClassMethods
, when included.
# File lib/parameters/module_methods.rb, line 9 def included(base) base.extend ClassMethods if base.kind_of?(Module) # re-extend the ModuleMethods base.extend ModuleMethods end end