Class: Adhearsion::Rayo::CommandNode
- Defined in:
- lib/adhearsion/rayo/command_node.rb
Direct Known Subclasses
Adhearsion::Rayo::Command::Accept, Adhearsion::Rayo::Command::Answer, Adhearsion::Rayo::Command::Dial, Adhearsion::Rayo::Command::Hangup, Adhearsion::Rayo::Command::Join, Adhearsion::Rayo::Command::Mute, Adhearsion::Rayo::Command::Redirect, Adhearsion::Rayo::Command::Reject, Adhearsion::Rayo::Command::Unjoin, Adhearsion::Rayo::Command::Unmute, Adhearsion::Rayo::Component::ComponentNode, Adhearsion::Rayo::Component::Output::Pause, Adhearsion::Rayo::Component::Output::Resume, Adhearsion::Rayo::Component::Output::Seek, Adhearsion::Rayo::Component::Output::SlowDown, Adhearsion::Rayo::Component::Output::SpeedUp, Adhearsion::Rayo::Component::Output::VolumeDown, Adhearsion::Rayo::Component::Output::VolumeUp, Adhearsion::Rayo::Component::Record::Pause, Adhearsion::Rayo::Component::Record::Resume, Adhearsion::Rayo::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.
13 14 15 16 |
# File 'lib/adhearsion/rayo/command_node.rb', line 13 def initialize(*args) super @response = FutureResource.new end |
Instance Method Details
#response(timeout = nil) ⇒ Object
32 33 34 |
# File 'lib/adhearsion/rayo/command_node.rb', line 32 def response(timeout = nil) @response.resource timeout end |
#response=(other) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/adhearsion/rayo/command_node.rb', line 36 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 |