Exception: WellFormed::RecordInvalid
- Defined in:
- lib/well_formed/errors.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.
10 11 12 13 14 |
# File 'lib/well_formed/errors.rb', line 10 def initialize(record) @record = record = record.errors. super(.empty? ? "Record invalid" : "Validation failed: #{.join(", ")}") end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
8 9 10 |
# File 'lib/well_formed/errors.rb', line 8 def record @record end |