Class: Cortex::PersistContentItemOperation

Inherits:
Object
  • Object
show all
Includes:
Dry::Transaction::Operation
Defined in:
app/operations/cortex/persist_content_item_operation.rb

Instance Method Summary collapse

Instance Method Details

#call(input) ⇒ Object



7
8
9
10
11
12
13
# File 'app/operations/cortex/persist_content_item_operation.rb', line 7

def call(input)
  if input.save
    Success(input)
  else
    Failure(input.errors)
  end
end