Exception: ViewModel::DeserializationError::InvalidSharedReference

Inherits:
InvalidRequest show all
Defined in:
lib/view_model/deserialization_error.rb

Overview

A view included a invalid shared reference

Instance Attribute Summary collapse

Attributes inherited from AbstractErrorWithBlame

#nodes

Instance Method Summary collapse

Methods inherited from ViewModel::DeserializationError

#code

Methods inherited from AbstractError

#aggregation?, #causes, #code, #exception, #status, #title, #to_s, #view

Constructor Details

#initialize(reference, node) ⇒ InvalidSharedReference

Returns a new instance of InvalidSharedReference.



73
74
75
76
# File 'lib/view_model/deserialization_error.rb', line 73

def initialize(reference, node)
  @reference = reference
  super([node])
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



71
72
73
# File 'lib/view_model/deserialization_error.rb', line 71

def reference
  @reference
end

Instance Method Details

#detailObject



78
79
80
# File 'lib/view_model/deserialization_error.rb', line 78

def detail
  "Could not find shared reference with key '#{reference}'"
end

#metaObject



82
83
84
# File 'lib/view_model/deserialization_error.rb', line 82

def meta
  super.merge(reference: reference)
end