Exception: MightyJSON::IllegalTypeError
- Inherits:
-
StandardError
- Object
- StandardError
- MightyJSON::IllegalTypeError
- Defined in:
- lib/mighty_json/errors.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:) ⇒ IllegalTypeError
constructor
A new instance of IllegalTypeError.
- #to_s ⇒ Object (also: #message)
Constructor Details
#initialize(type:) ⇒ IllegalTypeError
Returns a new instance of IllegalTypeError.
23 24 25 |
# File 'lib/mighty_json/errors.rb', line 23 def initialize(type:) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
21 22 23 |
# File 'lib/mighty_json/errors.rb', line 21 def type @type end |
Instance Method Details
#to_s ⇒ Object Also known as: message
27 28 29 |
# File 'lib/mighty_json/errors.rb', line 27 def to_s "#{type} can not be put on toplevel" end |