Exception: ViewModel::Migration::OneWayError

Inherits:
AbstractError
  • Object
show all
Defined in:
lib/view_model/migration/one_way_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, direction) ⇒ OneWayError

Returns a new instance of OneWayError.



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

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

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction.



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

def direction
  @direction
end

#vm_nameObject (readonly)

Returns the value of attribute vm_name.



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

def vm_name
  @vm_name
end

Instance Method Details

#detailObject



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

def detail
  "One way migration for #{vm_name} cannot be migrated #{direction}"
end

#metaObject



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

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