Exception: ViewModel::Migration::UnspecifiedVersionError

Inherits:
AbstractError
  • Object
show all
Defined in:
lib/view_model/migration/unspecified_version_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractError

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

Constructor Details

#initialize(vm_name, version) ⇒ UnspecifiedVersionError

Returns a new instance of UnspecifiedVersionError.



9
10
11
12
13
# File 'lib/view_model/migration/unspecified_version_error.rb', line 9

def initialize(vm_name, version)
  @vm_name = vm_name
  @version = version
  super()
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/view_model/migration/unspecified_version_error.rb', line 4

def version
  @version
end

#vm_nameObject (readonly)

Returns the value of attribute vm_name.



4
5
6
# File 'lib/view_model/migration/unspecified_version_error.rb', line 4

def vm_name
  @vm_name
end

Instance Method Details

#detailObject



15
16
17
# File 'lib/view_model/migration/unspecified_version_error.rb', line 15

def detail
  "Provided view for #{vm_name} at version #{version} does not match request"
end

#metaObject



19
20
21
22
23
24
# File 'lib/view_model/migration/unspecified_version_error.rb', line 19

def meta
  {
    viewmodel: vm_name,
    version: version,
  }
end