Class: Hexagonal::Runners::CreateRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/hexagonal/runners/create_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#form=(value) ⇒ Object (writeonly)

Sets the attribute form

Parameters:

  • value

    the value to set the attribute form to.



9
10
11
# File 'lib/hexagonal/runners/create_runner.rb', line 9

def form=(value)
  @form = value
end

Instance Method Details

#runObject



11
12
13
14
15
16
# File 'lib/hexagonal/runners/create_runner.rb', line 11

def run
  validate!
  create!
rescue Hexagonal::Errors::RecordInvalidException => ex
  creation_failed(ex)
end