class Reactor::Plans::DeleteAttribute

Public Class Methods

new(*args) click to toggle source
Calls superclass method Reactor::Plans::CommonAttribute::new
# File lib/reactor/plans/delete_attribute.rb, line 4
def initialize(*args)
  super()
  (name, x), options = separate_arguments(*args)
  @name = name || options[:name]
end

Public Instance Methods

migrate!() click to toggle source
# File lib/reactor/plans/delete_attribute.rb, line 16
def migrate!
  attrib = Reactor::Cm::Attribute.get(@name)
  attrib.delete!
end
prepare!() click to toggle source
# File lib/reactor/plans/delete_attribute.rb, line 10
def prepare!
  error("name is nil") if @name.nil?
  error("attribute #{@name} does not exist") if not Reactor::Cm::Attribute.exists?(@name)
  # TODO: check used..
end