Sha256: 66eb3565d56b166fa9876b23eba4ef937fc024d2adf007261108a637efd46fa0
Contents?: true
Size: 547 Bytes
Versions: 8
Compression:
Stored size: 547 Bytes
Contents
require "reactor/cm/channel" require "reactor/plans/common_channel" module Reactor module Plans class DeleteChannel < 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? error("channel #{@name} does not exist") unless Reactor::Cm::Channel.exists?(@name) end def migrate! Reactor::Cm::Channel.get(@name).delete! end end end end
Version data entries
8 entries across 8 versions & 1 rubygems