Class: Adhearsion::Rayo::Component::Asterisk::AMI::Action

Inherits:
ComponentNode show all
Defined in:
lib/adhearsion/rayo/component/asterisk/ami/action.rb

Defined Under Namespace

Classes: Complete

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #connection, #original_component

Instance Method Summary collapse

Methods inherited from ComponentNode

#add_event, #complete_event, #complete_event=, #initialize, #register_event_handler, #register_internal_handlers, #response=, #stop!, #stop_action, #trigger_event_handler, #write_action

Methods inherited from Adhearsion::Rayo::CommandNode

#initialize, #response, #response=

Methods inherited from RayoNode

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

Constructor Details

This class inherits a constructor from Adhearsion::Rayo::Component::ComponentNode

Instance Method Details

#inherit(xml_node) ⇒ Object



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

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

#rayo_attributesObject



21
22
23
# File 'lib/adhearsion/rayo/component/asterisk/ami/action.rb', line 21

def rayo_attributes
  {'name' => name}
end

#rayo_children(root) ⇒ Object



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

def rayo_children(root)
  super
  params.each do |name, value|
    root.param name: name, value: value
  end
end