Sha256: a1e938de9aee1c9dd98cb43df8ca536670329f8380c4d618be883a6138270e81

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 Bytes

Contents

module Reactor
  module Plans
    class UpdateAttribute < CommonAttribute
      def initialize(*args)
        super()
        (name, x), options = separate_arguments(*args)
        @name = name || options[:name]
      end

      def prepapre!
        error("name is nil") if @name.nil?
        error("attribute #{@name} not found") if not Reactor::Cm::Attribute.exists?(@name)
        prepare_params!(nil)
      end

      def migrate!
        attrib = Reactor::Cm::Attribute.get(@name)
        migrate_params!(attrib)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
infopark_reactor_migrations-1.6.1 lib/reactor/plans/update_attribute.rb
infopark_reactor_migrations-1.5.2 lib/reactor/plans/update_attribute.rb
infopark_reactor_migrations-1.5.1 lib/reactor/plans/update_attribute.rb