Exception: NoBrainer::Error::DocumentInvalid
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- NoBrainer::Error::DocumentInvalid
- Defined in:
- lib/no_brainer/error.rb
Instance Attribute Summary collapse
-
#instance ⇒ Object
Returns the value of attribute instance.
Instance Method Summary collapse
-
#initialize(instance) ⇒ DocumentInvalid
constructor
A new instance of DocumentInvalid.
- #message ⇒ Object
Constructor Details
#initialize(instance) ⇒ DocumentInvalid
Returns a new instance of DocumentInvalid.
22 23 24 |
# File 'lib/no_brainer/error.rb', line 22 def initialize(instance) @instance = instance end |
Instance Attribute Details
#instance ⇒ Object
Returns the value of attribute instance.
21 22 23 |
# File 'lib/no_brainer/error.rb', line 21 def instance @instance end |
Instance Method Details
#message ⇒ Object
26 27 28 |
# File 'lib/no_brainer/error.rb', line 26 def "#{instance} is invalid: #{instance.errors..join(", ")}" end |