class Reactor::Plans::CreateObjClass

Public Class Methods

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

Public Instance Methods

migrate!() click to toggle source
# File lib/reactor/plans/create_obj_class.rb, line 21
def migrate!
  klass = Reactor::Cm::ObjClass.create(@name, @type)
  migrate_attrs!(klass)
  migrate_params!(klass)
end
prepare!() click to toggle source
# File lib/reactor/plans/create_obj_class.rb, line 13
def prepare!
  error("name is nil") if @name.nil?
  error("type is nil") if @type.nil?
  error("objClass #{@name} already exists") if Reactor::Cm::ObjClass.exists?(@name)
  prepare_attrs!(nil)
  prepare_params!(nil)
end