Module: StarkParameters
- Defined in:
- lib/stark_parameters.rb,
lib/stark_parameters/version.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/stark_parameters.rb', line 3 def self.included(klass) klass.send :extend, ClassMethods klass.required_params = [] klass.permitted_params = [] klass.aliases = {} end |
Instance Method Details
#initialize(params) ⇒ Object
10 11 12 |
# File 'lib/stark_parameters.rb', line 10 def initialize(params) @params = make_strong_parameter(params) end |
#params ⇒ Object
14 15 16 |
# File 'lib/stark_parameters.rb', line 14 def params make_strong_parameter(permitted_params.merge(required_params)) end |