Class: Sonos::TopologyNode
- Inherits:
-
Object
- Object
- Sonos::TopologyNode
- Defined in:
- lib/sonos/topology_node.rb
Instance Attribute Summary collapse
-
#coordinator ⇒ Object
Returns the value of attribute coordinator.
-
#group ⇒ Object
Returns the value of attribute group.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #device ⇒ Object
-
#initialize(node) ⇒ TopologyNode
constructor
A new instance of TopologyNode.
- #ip ⇒ Object
Constructor Details
#initialize(node) ⇒ TopologyNode
Returns a new instance of TopologyNode.
5 6 7 8 9 10 11 |
# File 'lib/sonos/topology_node.rb', line 5 def initialize(node) node.attributes.each do |k, v| self.send("#{k}=", v.inner_text) if self.respond_to?(k.to_sym) end self.name = node.inner_text end |
Instance Attribute Details
#coordinator ⇒ Object
Returns the value of attribute coordinator.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def coordinator @coordinator end |
#group ⇒ Object
Returns the value of attribute group.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def group @group end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def name @name end |
#uuid ⇒ Object
Returns the value of attribute uuid.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def uuid @uuid end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/sonos/topology_node.rb', line 3 def version @version end |