Class: Punchblock::Event::End

Inherits:
Punchblock::Event show all
Includes:
HasHeaders
Defined in:
lib/punchblock/event/end.rb

Constant Summary

Constants inherited from RayoNode

RayoNode::InvalidNodeError

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 included from HasHeaders

#headers, #headers=, #headers_hash

Methods inherited from Punchblock::Event

new

Methods inherited from RayoNode

class_from_registration, #eql?, import, #inspect, new, register, #source

Instance Method Details

#inspect_attributesObject

:nodoc:



18
19
20
# File 'lib/punchblock/event/end.rb', line 18

def inspect_attributes # :nodoc:
  [:reason] + super
end

#reasonObject



10
11
12
# File 'lib/punchblock/event/end.rb', line 10

def reason
  children.select { |c| c.is_a? Nokogiri::XML::Element }.first.name.to_sym
end

#reason=(other) ⇒ Object



14
15
16
# File 'lib/punchblock/event/end.rb', line 14

def reason=(other)
  self << Nokogiri::XML::Element.new(other.to_s, self.document)
end