Class: Minato::Utils::BaseCommand::Create

Inherits:
Object
  • Object
show all
Includes:
SimpleCommand
Defined in:
lib/minato/utils/base_command/create.rb

Instance Method Summary collapse

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

#callObject



14
15
16
# File 'lib/minato/utils/base_command/create.rb', line 14

def call
  @model_class.send :create!, @params
end