Class: Reactor::Plans::CreateChannel
- Inherits:
-
CommonChannel
- Object
- CommonChannel
- Reactor::Plans::CreateChannel
- Defined in:
- lib/reactor/plans/create_channel.rb
Constant Summary
Constants inherited from CommonChannel
Reactor::Plans::CommonChannel::ALLOWED_PARAMS
Instance Method Summary collapse
-
#initialize(*args) ⇒ CreateChannel
constructor
A new instance of CreateChannel.
- #migrate! ⇒ Object
- #prepare! ⇒ Object
Methods inherited from CommonChannel
Methods included from Prepared
Constructor Details
#initialize(*args) ⇒ CreateChannel
Returns a new instance of CreateChannel.
8 9 10 11 12 |
# File 'lib/reactor/plans/create_channel.rb', line 8 def initialize(*args) super() (name, x), = separate_arguments(*args) @name = name || [: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 |