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.
167 168 169 170 |
# File 'lib/view_model/deserialization_error.rb', line 167 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.
165 166 167 |
# File 'lib/view_model/deserialization_error.rb', line 165 def expected_type @expected_type end |
Instance Method Details
#detail ⇒ Object
172 173 174 |
# File 'lib/view_model/deserialization_error.rb', line 172 def detail "Cannot deserialize inappropriate view type, expected '#{expected_type}' or an alias" end |
#meta ⇒ Object
176 177 178 |
# File 'lib/view_model/deserialization_error.rb', line 176 def super.merge(expected_type: expected_type) end |