Exception: ViewModel::Migration::NoPathError

Inherits:
AbstractError
  • Object
show all
Defined in:
lib/view_model/migration/no_path_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(viewmodel, from, to) ⇒ NoPathError

Returns a new instance of NoPathError.



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

def initialize(viewmodel, from, to)
  @vm_name = viewmodel.view_name
  @from = from
  @to = to
  super()
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



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

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



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

def to
  @to
end

#vm_nameObject (readonly)

Returns the value of attribute vm_name.



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

def vm_name
  @vm_name
end

Instance Method Details

#detailObject



16
17
18
# File 'lib/view_model/migration/no_path_error.rb', line 16

def detail
  "No migration path for #{vm_name} between client version #{from} and server version #{to}"
end

#metaObject



20
21
22
23
24
25
26
# File 'lib/view_model/migration/no_path_error.rb', line 20

def meta
  {
    viewmodel: vm_name,
    from: from,
    to: to,
  }
end