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
Instance Attribute Summary
Attributes inherited from RayoNode
#call_id, #client, #component_id, #connection, #domain, #mixer_name, #original_component
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
10 11 12 13 14 15 16 17 18 |
# File 'lib/punchblock/event/complete.rb', line 10 def reason element = find_first('*') if element RayoNode.import(element).tap do |reason| reason.call_id = call_id reason.component_id = component_id end end end |
#reason=(other) ⇒ Object
20 21 22 23 |
# File 'lib/punchblock/event/complete.rb', line 20 def reason=(other) children.map &:remove self << other end |
#recording ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/punchblock/event/complete.rb', line 25 def recording element = find_first('//ns:recording', :ns => RAYO_NAMESPACES[:record_complete]) if element RayoNode.import(element).tap do |recording| recording.call_id = call_id recording.component_id = component_id end end end |