Class: Nomen::Migration::Actions::ItemMerging

Inherits:
Base
  • Object
show all
Defined in:
lib/nomen/migration/actions/item_merging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

action_name, #action_name

Constructor Details

#initialize(element) ⇒ ItemMerging

Returns a new instance of ItemMerging.


6
7
8
9
10
11
# File 'lib/nomen/migration/actions/item_merging.rb', line 6

def initialize(element)
  name = element['item'].split('#')
  @nomenclature = name.first
  @name = name.second
  @into = element['into'].to_s
end

Instance Attribute Details

#intoObject (readonly)

Returns the value of attribute into


5
6
7
# File 'lib/nomen/migration/actions/item_merging.rb', line 5

def into
  @into
end

#nameObject (readonly)

Returns the value of attribute name


5
6
7
# File 'lib/nomen/migration/actions/item_merging.rb', line 5

def name
  @name
end

#nomenclatureObject (readonly)

Returns the value of attribute nomenclature


5
6
7
# File 'lib/nomen/migration/actions/item_merging.rb', line 5

def nomenclature
  @nomenclature
end

Instance Method Details

#human_nameObject


13
14
15
# File 'lib/nomen/migration/actions/item_merging.rb', line 13

def human_name
  "Merge item #{@nomenclature}##{@name} into #{@into}"
end