Sha256: 747303bacee12178b1a89e3ff9036ee25f30235bec3d2853f1285f8645b7e531

Contents?: true

Size: 490 Bytes

Versions: 8

Compression:

Stored size: 490 Bytes

Contents

module Reactor
  module Plans
    class DeleteGroup < CommonGroup
      def initialize(*args)
        super()

        (name,), options = separate_arguments(*args)
        @name = name || options[:name]
      end

      def prepare!
        error("name is nil") if @name.nil?
        error("group #{@name} does not exist") unless Reactor::Cm::Group.exists?(@name)
      end

      def migrate!
        group = Reactor::Cm::Group.get(@name)
        group.delete!
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.29.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.28.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.27.0.rc10 lib/reactor/plans/delete_group.rb
infopark_reactor-1.27.0.rc9 lib/reactor/plans/delete_group.rb
infopark_reactor-1.27.0.rc8 lib/reactor/plans/delete_group.rb
infopark_reactor-1.27.0.rc7 lib/reactor/plans/delete_group.rb
infopark_reactor-1.27.0.rc4 lib/reactor/plans/delete_group.rb