Exception: ViewModel::DeserializationError::UnknownView

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

Overview

A view was of an unknown type

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(type) ⇒ UnknownView

Returns a new instance of UnknownView.



91
92
93
94
# File 'lib/view_model/deserialization_error.rb', line 91

def initialize(type)
  @type = type
  super([])
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



89
90
91
# File 'lib/view_model/deserialization_error.rb', line 89

def type
  @type
end

Instance Method Details

#detailObject



96
97
98
# File 'lib/view_model/deserialization_error.rb', line 96

def detail
  "ViewModel class for view name '#{type}' could not be found"
end

#metaObject



100
101
102
# File 'lib/view_model/deserialization_error.rb', line 100

def meta
  super.merge(type: type)
end