Class: Punchblock::CommandNode
- Defined in:
- lib/punchblock/command_node.rb
Direct Known Subclasses
Punchblock::Command::Accept, Punchblock::Command::Answer, Punchblock::Command::Dial, Punchblock::Command::Hangup, Punchblock::Command::Join, Punchblock::Command::Mute, Punchblock::Command::Redirect, Punchblock::Command::Reject, Punchblock::Command::Unjoin, Punchblock::Command::Unmute, Punchblock::Component::ComponentNode, Punchblock::Component::Output::Pause, Punchblock::Component::Output::Resume, Punchblock::Component::Output::Seek, Punchblock::Component::Output::SlowDown, Punchblock::Component::Output::SpeedUp, Punchblock::Component::Output::VolumeDown, Punchblock::Component::Output::VolumeUp, Punchblock::Component::Record::Pause, Punchblock::Component::Record::Resume, Punchblock::Component::Stop
Instance Attribute Summary
Attributes inherited from RayoNode
#client, #connection, #original_component
Instance Method Summary collapse
-
#initialize(*args) ⇒ CommandNode
constructor
A new instance of CommandNode.
- #response(timeout = nil) ⇒ Object
- #response=(other) ⇒ Object
Methods inherited from RayoNode
#==, class_from_registration, from_xml, #inherit, #inspect, #rayo_attributes, #rayo_children, register, #source, #to_rayo, #to_xml
Constructor Details
#initialize(*args) ⇒ CommandNode
Returns a new instance of CommandNode.
9 10 11 12 |
# File 'lib/punchblock/command_node.rb', line 9 def initialize(*args) super @response = FutureResource.new end |
Instance Method Details
#response(timeout = nil) ⇒ Object
28 29 30 |
# File 'lib/punchblock/command_node.rb', line 28 def response(timeout = nil) @response.resource timeout end |
#response=(other) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/punchblock/command_node.rb', line 32 def response=(other) return if @response.set_yet? @response.resource = other execute! rescue StateMachine::InvalidTransition => e e. << " for command #{self}" raise e rescue FutureResource::ResourceAlreadySetException end |