Class: Punchblock::Command::Dial
- Inherits:
-
Punchblock::CommandNode
- Object
- Niceogiri::XML::Node
- RayoNode
- Punchblock::CommandNode
- Punchblock::Command::Dial
- Includes:
- HasHeaders
- Defined in:
- lib/punchblock/command/dial.rb
Constant Summary
Constants inherited from RayoNode
Instance Attribute Summary
Attributes inherited from RayoNode
#client, #component_id, #connection, #domain, #original_component, #target_call_id, #target_mixer_name
Class Method Summary collapse
-
.new(options = {}) ⇒ Command::Dial
Create a dial command.
Instance Method Summary collapse
-
#from ⇒ String
The caller ID.
- #from=(dial_from) ⇒ Object
-
#inspect_attributes ⇒ Object
:nodoc:.
-
#join ⇒ Join
The nested join.
- #join=(other) ⇒ Object
- #response=(other) ⇒ Object
-
#timeout ⇒ Integer
Timeout in milliseconds.
- #timeout=(other) ⇒ Object
-
#to ⇒ String
Destination to dial.
- #to=(dial_to) ⇒ Object
Methods included from HasHeaders
#headers, #headers=, #headers_hash
Methods inherited from Punchblock::CommandNode
#initialize, #response, #write_attr
Methods inherited from RayoNode
class_from_registration, #eql?, import, #inspect, register, #source
Constructor Details
This class inherits a constructor from Punchblock::CommandNode
Class Method Details
.new(options = {}) ⇒ Command::Dial
Create a dial command
31 32 33 34 35 |
# File 'lib/punchblock/command/dial.rb', line 31 def self.new( = {}) super().tap do |new_node| .each_pair { |k,v| new_node.send :"#{k}=", v } end end |
Instance Method Details
#from ⇒ String
Returns the caller ID.
51 52 53 |
# File 'lib/punchblock/command/dial.rb', line 51 def from read_attr :from end |
#from=(dial_from) ⇒ Object
57 58 59 |
# File 'lib/punchblock/command/dial.rb', line 57 def from=(dial_from) write_attr :from, dial_from end |
#inspect_attributes ⇒ Object
:nodoc:
95 96 97 |
# File 'lib/punchblock/command/dial.rb', line 95 def inspect_attributes # :nodoc: [:to, :from, :join] + super end |
#join ⇒ Join
Returns the nested join.
76 77 78 79 |
# File 'lib/punchblock/command/dial.rb', line 76 def join element = find_first 'ns:join', :ns => Join.registered_ns Join.new element if element end |
#join=(other) ⇒ Object
84 85 86 87 88 |
# File 'lib/punchblock/command/dial.rb', line 84 def join=(other) remove_children :join join = Join.new(other) unless other.is_a?(Join) self << join end |
#response=(other) ⇒ Object
90 91 92 93 |
# File 'lib/punchblock/command/dial.rb', line 90 def response=(other) @target_call_id = other.id if other.is_a?(Ref) super end |
#timeout ⇒ Integer
Returns timeout in milliseconds.
63 64 65 |
# File 'lib/punchblock/command/dial.rb', line 63 def timeout read_attr :timeout, :to_i end |
#timeout=(other) ⇒ Object
69 70 71 |
# File 'lib/punchblock/command/dial.rb', line 69 def timeout=(other) write_attr :timeout, other end |
#to ⇒ String
Returns destination to dial.
39 40 41 |
# File 'lib/punchblock/command/dial.rb', line 39 def to read_attr :to end |
#to=(dial_to) ⇒ Object
45 46 47 |
# File 'lib/punchblock/command/dial.rb', line 45 def to=(dial_to) write_attr :to, dial_to end |