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.
234 235 236 237 |
# File 'lib/view_model/deserialization_error.rb', line 234 def initialize(type, nodes) @type = type super(nodes) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
232 233 234 |
# File 'lib/view_model/deserialization_error.rb', line 232 def type @type end |
Instance Method Details
#detail ⇒ Object
239 240 241 |
# File 'lib/view_model/deserialization_error.rb', line 239 def detail "Duplicate views for the same '#{type}' specified: " + nodes.map(&:to_s).join(', ') end |
#meta ⇒ Object
243 244 245 |
# File 'lib/view_model/deserialization_error.rb', line 243 def super.merge(type: type) end |