Class: Reactor::Plans::CreateChannel
Constant Summary
Reactor::Plans::CommonChannel::ALLOWED_PARAMS
Instance Method Summary
collapse
#set
Methods included from Prepared
#error, #separate_arguments
Constructor Details
8
9
10
11
12
|
# File 'lib/reactor/plans/create_channel.rb', line 8
def initialize(*args)
super()
(name, x), options = separate_arguments(*args)
@name = name || options[:name]
end
|
Instance Method Details
#migrate! ⇒ Object
18
19
20
21
|
# File 'lib/reactor/plans/create_channel.rb', line 18
def migrate!
channel = Reactor::Cm::Channel.create(@name)
migrate_params!(channel)
end
|
#prepare! ⇒ Object
14
15
16
|
# File 'lib/reactor/plans/create_channel.rb', line 14
def prepare!
error("name is nil") if @name.nil?
end
|