Class: Punchblock::Component::Asterisk::AMI::Action

Inherits:
ComponentNode show all
Defined in:
lib/punchblock/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 Punchblock::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 Punchblock::Component::ComponentNode

Instance Method Details

- (Object) inherit(xml_node)



13
14
15
16
17
18
# File 'lib/punchblock/component/asterisk/ami/action.rb', line 13

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

- (Object) rayo_attributes



20
21
22
# File 'lib/punchblock/component/asterisk/ami/action.rb', line 20

def rayo_attributes
  {'name' => name}
end

- (Object) rayo_children(root)



24
25
26
27
28
29
# File 'lib/punchblock/component/asterisk/ami/action.rb', line 24

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