Class: AastraXmlApi::PhoneSoftkeyEntry
- Inherits:
-
Object
- Object
- AastraXmlApi::PhoneSoftkeyEntry
- Defined in:
- lib/aastra_xml_api/phone_softkey_entry.rb
Instance Method Summary collapse
-
#initialize(index, label, uri, icon) ⇒ PhoneSoftkeyEntry
constructor
Create new softkey entry at index showing on screen with label.
-
#render ⇒ Object
Create XML text output for this entry.
Constructor Details
#initialize(index, label, uri, icon) ⇒ PhoneSoftkeyEntry
Create new softkey entry at index showing on screen with label. When pressed will call URI. Next to the label text the given icon will be shown.
21 22 23 24 25 26 |
# File 'lib/aastra_xml_api/phone_softkey_entry.rb', line 21 def initialize(index, label, uri, icon) @index = index @label = label @uri = uri @icon = icon end |
Instance Method Details
#render ⇒ Object
Create XML text output for this entry.
29 30 31 32 33 34 35 36 37 |
# File 'lib/aastra_xml_api/phone_softkey_entry.rb', line 29 def render xml = "<SoftKey index=\"#{@index}\"" xml += " icon=\"#{@icon}\"" if not @icon.nil? xml += ">\n" xml += "<Label>#{@label}</Label>\n" xml += "<URI>#{@uri}</URI>\n" xml += "</SoftKey>\n" return xml end |