class UPnPActionArgument

Attributes

direction[RW]
name[RW]

Public Class Methods

read_xml_node(node) click to toggle source
# File lib/upnp_model.rb, line 363
def UPnPActionArgument.read_xml_node(node)
  argument = UPnPActionArgument.new
  node.elements.each do |elem|
    case elem.name
    when 'name'
      argument.name = elem.text
    when 'direction'
      argument.direction = elem.text
    when 'relatedStateVariable'
      argument.related_state_variable = elem.text
    end
  end
  return argument
end

Public Instance Methods

to_s() click to toggle source
# File lib/upnp_model.rb, line 343
def to_s
  "UPnPActionArgument -- #{@name} (direction: '#{@direction}' related state variable: '#{@related_state_variable}')"
end
to_xml() click to toggle source
# File lib/upnp_model.rb, line 347
def to_xml
  argument = XmlTag.new 'argument'

  prop = argument.append XmlTag.new 'name'
  prop.append XmlText.new @name

  prop = argument.append XmlTag.new 'direction'
  prop.append XmlText.new @direction

  prop = argument.append XmlTag.new 'relatedStateVariable'
  prop.append XmlText.new @related_state_variable

  return argument.to_s
end