Class: Minato::Utils::BaseCommand::Create
- Inherits:
-
Object
- Object
- Minato::Utils::BaseCommand::Create
- Includes:
- SimpleCommand
- Defined in:
- lib/minato/utils/base_command/create.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model_class, params) ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize(model_class, params) ⇒ Create
Returns a new instance of Create.
9 10 11 12 |
# File 'lib/minato/utils/base_command/create.rb', line 9 def initialize(model_class, params) @model_class = model_class @params = params end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/minato/utils/base_command/create.rb', line 14 def call @model_class.send :create!, @params end |