Class: Punchblock::Command::Join
- Inherits:
-
Punchblock::CommandNode
- Object
- Niceogiri::XML::Node
- RayoNode
- Punchblock::CommandNode
- Punchblock::Command::Join
- Defined in:
- lib/punchblock/command/join.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::Join
Create a join command.
Instance Method Summary collapse
-
#call_id ⇒ String
The call ID to join.
- #call_id=(other) ⇒ Object
-
#direction ⇒ String
The direction in which media should flow.
- #direction=(other) ⇒ Object
-
#inspect_attributes ⇒ Object
:nodoc:.
-
#media ⇒ String
The method by which to negotiate media.
- #media=(other) ⇒ Object
-
#mixer_name ⇒ String
The mixer name to join.
- #mixer_name=(other) ⇒ Object
Methods inherited from Punchblock::CommandNode
#initialize, #response, #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::Join
Create a join command
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/punchblock/command/join.rb', line 19 def self.new( = {}) super().tap do |new_node| case when Nokogiri::XML::Node new_node.inherit when Hash .each_pair { |k,v| new_node.send :"#{k}=", v } end end end |
Instance Method Details
#call_id ⇒ String
Returns the call ID to join.
32 33 34 |
# File 'lib/punchblock/command/join.rb', line 32 def call_id read_attr :'call-id' end |
#call_id=(other) ⇒ Object
38 39 40 |
# File 'lib/punchblock/command/join.rb', line 38 def call_id=(other) write_attr :'call-id', other end |
#direction ⇒ String
Returns the direction in which media should flow.
56 57 58 |
# File 'lib/punchblock/command/join.rb', line 56 def direction read_attr :direction, :to_sym end |
#direction=(other) ⇒ Object
62 63 64 |
# File 'lib/punchblock/command/join.rb', line 62 def direction=(other) write_attr :direction, other end |
#inspect_attributes ⇒ Object
:nodoc:
78 79 80 |
# File 'lib/punchblock/command/join.rb', line 78 def inspect_attributes # :nodoc: [:call_id, :mixer_name, :direction, :media] + super end |
#media ⇒ String
Returns the method by which to negotiate media.
68 69 70 |
# File 'lib/punchblock/command/join.rb', line 68 def media read_attr :media, :to_sym end |
#media=(other) ⇒ Object
74 75 76 |
# File 'lib/punchblock/command/join.rb', line 74 def media=(other) write_attr :media, other end |
#mixer_name ⇒ String
Returns the mixer name to join.
44 45 46 |
# File 'lib/punchblock/command/join.rb', line 44 def mixer_name read_attr :'mixer-name' end |
#mixer_name=(other) ⇒ Object
50 51 52 |
# File 'lib/punchblock/command/join.rb', line 50 def mixer_name=(other) write_attr :'mixer-name', other end |