Sha256: b7ae18d2dd626b6a8b1a85f382b425bf4910c6ff88f19866378d9bec4f062bc6

Contents?: true

Size: 494 Bytes

Versions: 8

Compression:

Stored size: 494 Bytes

Contents

require "reactor/cm/channel"
require "reactor/plans/common_channel"

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

      def prepare!
        error("name is nil") if @name.nil?
      end

      def migrate!
        channel = Reactor::Cm::Channel.create(@name)
        migrate_params!(channel)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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