Class: Marameters::Categorizer
- Inherits:
-
Object
- Object
- Marameters::Categorizer
- Defined in:
- lib/marameters/categorizer.rb
Overview
Builds the primary argument categories based on method parameters and arguments.
Instance Method Summary collapse
- #call(parameters, arguments) ⇒ Object
-
#initialize(model: Models::Forward) ⇒ Categorizer
constructor
A new instance of Categorizer.
Constructor Details
#initialize(model: Models::Forward) ⇒ Categorizer
Returns a new instance of Categorizer.
6 7 8 |
# File 'lib/marameters/categorizer.rb', line 6 def initialize model: Models::Forward @model = model end |
Instance Method Details
#call(parameters, arguments) ⇒ Object
10 11 12 13 |
# File 'lib/marameters/categorizer.rb', line 10 def call parameters, arguments @record = model.new map parameters, arguments.is_a?(Array) ? arguments : [arguments] end |