Class: Punchblock::Component::Asterisk::AGI::Command::Param

Inherits:
RayoNode
  • Object
show all
Defined in:
lib/punchblock/component/asterisk/agi/command.rb

Instance Attribute Summary

Attributes inherited from RayoNode

#call_id, #client, #component_id, #connection, #domain, #mixer_name, #original_component

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RayoNode

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

Class Method Details

.new(value) ⇒ Object

Parameters:

  • name (String)
  • value (String)


55
56
57
58
59
60
61
62
63
64
# File 'lib/punchblock/component/asterisk/agi/command.rb', line 55

def self.new(value)
  super(:param).tap do |new_node|
    case value
    when Nokogiri::XML::Node
      new_node.inherit value
    else
      new_node.value = value
    end
  end
end

Instance Method Details

#inspect_attributesObject

:nodoc:



78
79
80
# File 'lib/punchblock/component/asterisk/agi/command.rb', line 78

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

#valueString

The Header’s value

Returns:

  • (String)


68
69
70
# File 'lib/punchblock/component/asterisk/agi/command.rb', line 68

def value
  read_attr :value
end

#value=(value) ⇒ Object

Set the Header’s value

Parameters:

  • value (String)

    the new value for the param



74
75
76
# File 'lib/punchblock/component/asterisk/agi/command.rb', line 74

def value=(value)
  write_attr :value, value
end