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.



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

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

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#detailObject



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

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

#metaObject



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

def meta
  super.merge(type: type)
end