Sha256: a72fe2800041bde828ff415ce3dd2dee3cfa37e92c753506629b9110cb4e5696
Contents?: true
Size: 825 Bytes
Versions: 49
Compression:
Stored size: 825 Bytes
Contents
# -*- encoding : utf-8 -*- require 'reactor/plans/common_attribute' module Reactor module Plans class CreateAttribute < CommonAttribute def initialize(*args) super() (name, type), options = separate_arguments(*args) @name = name || options[:name] @type = type || options[:type] # Default values for attributes: # isSearchableInCM: false # isSearchableInTE: false set(:isSearchableInCM, 0) set(:isSearchableInTE, 0) end def prepare! error("name ist nil") if @name.nil? error("type is nil") if @type.nil? # TODO: Type check prepare_params!(nil) end def migrate! attrib = Reactor::Cm::Attribute.create(@name, @type) migrate_params!(attrib) end end end end
Version data entries
49 entries across 49 versions & 2 rubygems