Sha256: 3e9671a89120174334a617f8a2fea4fde19b0c9fa43f98927cbd0d0d5b653254
Contents?: true
Size: 604 Bytes
Versions: 8
Compression:
Stored size: 604 Bytes
Contents
module Reactor module Plans class RenameObjClass include Prepared def initialize(*args) (from, to), options = separate_arguments(*args) @from = from || options[:from] @to = to || options[:to] end def prepare! error("from is nil") if @from.nil? error("to is nil") if @to.nil? error("from does not exist") unless Reactor::Cm::ObjClass.exists?(@from) error("to does exist") if Reactor::Cm::ObjClass.exists?(@to) end def migrate! Reactor::Cm::ObjClass.rename(@from, @to) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems