Class: Adhearsion::Event::Asterisk::AMI

Inherits:
Adhearsion::Event show all
Defined in:
lib/adhearsion/event/asterisk/ami.rb

Instance Attribute Summary

Attributes inherited from Rayo::RayoNode

#client, #connection, #original_component

Instance Method Summary collapse

Methods inherited from Rayo::RayoNode

#==, class_from_registration, from_xml, #inspect, register, #source, #to_rayo, #to_xml

Instance Method Details

#inherit(xml_node) ⇒ Object


14
15
16
17
18
19
# File 'lib/adhearsion/event/asterisk/ami.rb', line 14

def inherit(xml_node)
  xml_node.xpath('//ns:attribute', ns: self.class.registered_ns).to_a.each do |attribute|
    headers[attribute[:name]] = attribute[:value]
  end
  super
end

#rayo_attributesObject


21
22
23
# File 'lib/adhearsion/event/asterisk/ami.rb', line 21

def rayo_attributes
  {'name' => name}
end

#rayo_children(root) ⇒ Object


25
26
27
28
29
30
# File 'lib/adhearsion/event/asterisk/ami.rb', line 25

def rayo_children(root)
  super
  headers.each do |name, value|
    root.attribute name: name, value: value
  end
end