Exception: Toy::RecordInvalid
- Defined in:
- lib/toy/exceptions.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordInvalid
constructor
A new instance of RecordInvalid.
Constructor Details
#initialize(record) ⇒ RecordInvalid
Returns a new instance of RecordInvalid.
8 9 10 11 |
# File 'lib/toy/exceptions.rb', line 8 def initialize(record) @record = record super("Invalid record: #{@record.errors..to_sentence}") end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
7 8 9 |
# File 'lib/toy/exceptions.rb', line 7 def record @record end |