Sha256: 1a05f66c8e39b658d2e2b844a1ca23d1cc9dfecafdd8ae8265fd659472de64ad

Contents?: true

Size: 525 Bytes

Versions: 49

Compression:

Stored size: 525 Bytes

Contents

# -*- encoding : utf-8 -*-
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

49 entries across 49 versions & 2 rubygems

Version Path
infopark_reactor-1.26.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.26.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.25.2 lib/reactor/plans/delete_group.rb
infopark_reactor-1.25.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.25.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.24.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.24.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.23.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.23.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.23.0.beta2 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.6 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.5 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.4 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.3 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.2 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.1 lib/reactor/plans/delete_group.rb
infopark_reactor-1.22.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.21.0 lib/reactor/plans/delete_group.rb
infopark_reactor-1.20.4 lib/reactor/plans/delete_group.rb
infopark_reactor-1.20.3 lib/reactor/plans/delete_group.rb