Exception: Subroutine::Failure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/subroutine/failure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ Failure

Returns a new instance of Failure.



6
7
8
9
10
# File 'lib/subroutine/failure.rb', line 6

def initialize(record)
  @record = record
  errors = @record.errors.full_messages.join(', ')
  super(errors)
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



5
6
7
# File 'lib/subroutine/failure.rb', line 5

def record
  @record
end