Exception: Grac::Exception::InvalidContent
- Inherits:
-
StandardError
- Object
- StandardError
- Grac::Exception::InvalidContent
- Defined in:
- lib/grac/exception.rb
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.
64 65 66 67 |
# File 'lib/grac/exception.rb', line 64 def initialize(body, type) @body = body @type = type end |
Instance Method Details
#inspect ⇒ Object
73 74 75 |
# File 'lib/grac/exception.rb', line 73 def inspect "#{self.class.name}: #{}" end |
#message ⇒ Object Also known as: to_s
69 70 71 |
# File 'lib/grac/exception.rb', line 69 def "Failed to parse body as '#{@type}': '#{@body}'" end |