Class: Minato::Utils::BaseCommand::Update

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

Instance Method Summary collapse

Constructor Details

#initialize(model, params) ⇒ Update

Returns a new instance of Update.



9
10
11
12
# File 'lib/minato/utils/base_command/update.rb', line 9

def initialize(model, params)
  @model = model
  @params = params
end

Instance Method Details

#callObject



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

def call
  @model.update!(@params)
  @model
end