Class: Reactor::Plans::UpdateObjClass

Inherits:
CommonObjClass show all
Includes:
Prepared
Defined in:
lib/reactor/plans/update_obj_class.rb

Constant Summary

Constants inherited from CommonObjClass

CommonObjClass::ALLOWED_PARAMS

Instance Method Summary collapse

Methods included from Prepared

#error, #separate_arguments

Methods inherited from CommonObjClass

#drop, #set, #take

Constructor Details

#initialize(*args) ⇒ UpdateObjClass

Returns a new instance of UpdateObjClass.



7
8
9
10
11
# File 'lib/reactor/plans/update_obj_class.rb', line 7

def initialize(*args)
  super()
  (name, x), options = separate_arguments(*args)
  @name = name || options[:name]
end

Instance Method Details

#migrate!Object



20
21
22
23
# File 'lib/reactor/plans/update_obj_class.rb', line 20

def migrate!
  migrate_attrs!(@klass)
  migrate_params!(@klass)
end

#prepare!Object



13
14
15
16
17
18
# File 'lib/reactor/plans/update_obj_class.rb', line 13

def prepare!
  error("objClass #{@name} not found") if Reactor::Cm::ObjClass.exists?(@name)
  @klass = Reactor::Cm::ObjClass.get(@name)
  prepare_attrs!(@klass)
  prepare_params!(@klass)
end