Class: Punchblock::Event::Complete
- Inherits:
-
Punchblock::Event
- Object
- Niceogiri::XML::Node
- RayoNode
- Punchblock::Event
- Punchblock::Event::Complete
- Defined in:
- lib/punchblock/event/complete.rb
Defined Under Namespace
Classes: Error, Hangup, Reason, Stop
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
Instance Method Summary collapse
Methods inherited from Punchblock::Event
Methods inherited from RayoNode
class_from_registration, #eql?, import, #inspect, new, register, #source
Instance Method Details
#inspect_attributes ⇒ Object
:nodoc:
35 36 37 |
# File 'lib/punchblock/event/complete.rb', line 35 def inspect_attributes # :nodoc: [:reason, :recording] + super end |
#reason ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/punchblock/event/complete.rb', line 12 def reason element = find_first '*' return unless element RayoNode.import(element).tap do |reason| reason.target_call_id = target_call_id reason.component_id = component_id end end |
#reason=(other) ⇒ Object
21 22 23 24 |
# File 'lib/punchblock/event/complete.rb', line 21 def reason=(other) children.map(&:remove) self << other end |
#recording ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/punchblock/event/complete.rb', line 26 def recording element = find_first('//ns:recording', :ns => RAYO_NAMESPACES[:record_complete]) return unless element RayoNode.import(element).tap do |recording| recording.target_call_id = target_call_id recording.component_id = component_id end end |