Exception: Grac::Exception::InvalidContent
- Inherits:
-
StandardError
- Object
- StandardError
- Grac::Exception::InvalidContent
- Defined in:
- lib/grac/exception.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body, type) ⇒ InvalidContent
constructor
A new instance of InvalidContent.
- #inspect ⇒ Object
- #message ⇒ Object (also: #to_s)
Constructor Details
#initialize(body, type) ⇒ InvalidContent
Returns a new instance of InvalidContent.
66 67 68 69 |
# File 'lib/grac/exception.rb', line 66 def initialize(body, type) @body = body @type = type end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
64 65 66 |
# File 'lib/grac/exception.rb', line 64 def body @body end |
Instance Method Details
#inspect ⇒ Object
75 76 77 |
# File 'lib/grac/exception.rb', line 75 def inspect "#{self.class.name}: #{}" end |
#message ⇒ Object Also known as: to_s
71 72 73 |
# File 'lib/grac/exception.rb', line 71 def "Failed to parse body as '#{@type}': '#{@body}'" end |