Exception: Discard::RecordNotDiscarded

Inherits:
DiscardError
  • Object
show all
Defined in:
lib/discard/errors.rb

Overview

Raised by Model#discard!

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, record = nil) ⇒ RecordNotDiscarded

Returns a new instance of RecordNotDiscarded.



14
15
16
17
# File 'lib/discard/errors.rb', line 14

def initialize(message = nil, record = nil)
  @record = record
  super(message)
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



12
13
14
# File 'lib/discard/errors.rb', line 12

def record
  @record
end