Exception: StrongJSON::Type::UnexpectedAttributeError
- Inherits:
-
StandardError
- Object
- StandardError
- StrongJSON::Type::UnexpectedAttributeError
- Defined in:
- lib/strong_json/type.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:, attribute:) ⇒ UnexpectedAttributeError
constructor
A new instance of UnexpectedAttributeError.
- #type ⇒ Object
Constructor Details
#initialize(path:, attribute:) ⇒ UnexpectedAttributeError
Returns a new instance of UnexpectedAttributeError.
373 374 375 376 377 |
# File 'lib/strong_json/type.rb', line 373 def initialize(path:, attribute:) @path = path @attribute = attribute super "UnexpectedAttributeError at #{path.to_s}: attribute=#{attribute}" end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
371 372 373 |
# File 'lib/strong_json/type.rb', line 371 def attribute @attribute end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
371 372 373 |
# File 'lib/strong_json/type.rb', line 371 def path @path end |
Instance Method Details
#type ⇒ Object
379 380 381 |
# File 'lib/strong_json/type.rb', line 379 def type path.type end |