Class: AastraXmlApi::PhoneConfigurationEntry

Inherits:
Phone
  • Object
show all
Defined in:
lib/aastra_xml_api/phone_configuration_entry.rb

Constant Summary

Constants inherited from Phone

AastraXmlApi::Phone::HIGHASCII

Instance Method Summary collapse

Methods inherited from Phone

#addIcon, #addSoftkey, #convert_high_ascii, #escape, #getRefreshTimeout, #getRefreshURL, #setAllowAnswer, #setBeep, #setCancelAction, #setDestroyOnExit, #setLockIn, #setRefresh, #setTimeout, #setTitle, #setTitleWrap

Constructor Details

#initialize(parameter, value) ⇒ PhoneConfigurationEntry

Create a new parameter/value pair. This overrides the initialize method in Phone.



17
18
19
20
# File 'lib/aastra_xml_api/phone_configuration_entry.rb', line 17

def initialize(parameter, value)
  @parameter = parameter
  @value = value
end

Instance Method Details

#renderObject

Create XML text output for this entry.



33
34
35
36
37
38
39
40
41
# File 'lib/aastra_xml_api/phone_configuration_entry.rb', line 33

def render
  parameter = escape(@parameter)
  value = escape(@value)
  xml = "<ConfigurationItem>\n"
  xml += "<Parameter>#{parameter}</Parameter>\n"
  xml += "<Value>#{value}</Value>\n"
  xml += "</ConfigurationItem>\n"
  return xml
end

#setParameter(parameter) ⇒ Object

Set the parameter for this entry.



23
24
25
# File 'lib/aastra_xml_api/phone_configuration_entry.rb', line 23

def setParameter(parameter)
  @parameter = parameter
end

#setValue(value) ⇒ Object

Set the value for this entry.



28
29
30
# File 'lib/aastra_xml_api/phone_configuration_entry.rb', line 28

def setValue(value)
  @value = value
end