Exception: ViewModel::DeserializationError::DuplicateNodes
- Inherits:
-
InvalidRequest
- Object
- StandardError
- AbstractError
- AbstractErrorWithBlame
- ViewModel::DeserializationError
- InvalidRequest
- ViewModel::DeserializationError::DuplicateNodes
- Defined in:
- lib/view_model/deserialization_error.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from AbstractErrorWithBlame
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(type, nodes) ⇒ DuplicateNodes
constructor
A new instance of DuplicateNodes.
- #meta ⇒ Object
Methods inherited from ViewModel::DeserializationError
Methods inherited from AbstractError
#aggregation?, #causes, #code, #exception, #status, #title, #to_s, #view
Constructor Details
#initialize(type, nodes) ⇒ DuplicateNodes
Returns a new instance of DuplicateNodes.
217 218 219 220 |
# File 'lib/view_model/deserialization_error.rb', line 217 def initialize(type, nodes) @type = type super(nodes) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
215 216 217 |
# File 'lib/view_model/deserialization_error.rb', line 215 def type @type end |
Instance Method Details
#detail ⇒ Object
222 223 224 |
# File 'lib/view_model/deserialization_error.rb', line 222 def detail "Duplicate views for the same '#{type}' specified: " + nodes.map(&:to_s).join(', ') end |
#meta ⇒ Object
226 227 228 |
# File 'lib/view_model/deserialization_error.rb', line 226 def super.merge(type: type) end |