Exception: ViewModel::DeserializationError::InvalidViewType
- Inherits:
-
InvalidRequest
- Object
- StandardError
- AbstractError
- AbstractErrorWithBlame
- ViewModel::DeserializationError
- InvalidRequest
- ViewModel::DeserializationError::InvalidViewType
- Defined in:
- lib/view_model/deserialization_error.rb
Instance Attribute Summary collapse
-
#expected_type ⇒ Object
readonly
Returns the value of attribute expected_type.
Attributes inherited from AbstractErrorWithBlame
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(expected_type, node) ⇒ InvalidViewType
constructor
A new instance of InvalidViewType.
- #meta ⇒ Object
Methods inherited from ViewModel::DeserializationError
Methods inherited from AbstractError
#aggregation?, #causes, #code, #exception, #status, #title, #to_s, #view
Constructor Details
#initialize(expected_type, node) ⇒ InvalidViewType
Returns a new instance of InvalidViewType.
169 170 171 172 |
# File 'lib/view_model/deserialization_error.rb', line 169 def initialize(expected_type, node) @expected_type = expected_type super(node) end |
Instance Attribute Details
#expected_type ⇒ Object (readonly)
Returns the value of attribute expected_type.
167 168 169 |
# File 'lib/view_model/deserialization_error.rb', line 167 def expected_type @expected_type end |
Instance Method Details
#detail ⇒ Object
174 175 176 |
# File 'lib/view_model/deserialization_error.rb', line 174 def detail "Cannot deserialize inappropriate view type, expected '#{expected_type}' or an alias" end |
#meta ⇒ Object
178 179 180 |
# File 'lib/view_model/deserialization_error.rb', line 178 def super.merge(expected_type: expected_type) end |