Class: Nomen::Migration::Actions::ItemRemoval

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

action_name, #action_name

Constructor Details

#initialize(element) ⇒ ItemRemoval

Returns a new instance of ItemRemoval.


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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


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

def name
  @name
end

#nomenclatureObject (readonly)

Returns the value of attribute nomenclature


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

def nomenclature
  @nomenclature
end

Instance Method Details

#human_nameObject


12
13
14
# File 'lib/nomen/migration/actions/item_removal.rb', line 12

def human_name
  "Remove item #{@nomenclature}##{@name}"
end