Class: Shared::GroupableNode
- Defined in:
- lib/vas/shared/nodes.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Node
#agent_home, #architecture, #host_names, #ip_addresses, #metadata, #operating_system
Attributes inherited from Resource
Instance Method Summary collapse
-
#groups ⇒ Object
An array of the groups which contain this node.
-
#initialize(location, client, group_class) ⇒ GroupableNode
constructor
A new instance of GroupableNode.
Constructor Details
#initialize(location, client, group_class) ⇒ GroupableNode
Returns a new instance of GroupableNode.
56 57 58 59 |
# File 'lib/vas/shared/nodes.rb', line 56 def initialize(location, client, group_class) super(location, client) @group_class = group_class end |
Instance Method Details
#groups ⇒ Object
An array of the groups which contain this node
62 63 64 65 66 67 |
# File 'lib/vas/shared/nodes.rb', line 62 def groups groups = [] Util::LinkUtils.get_link_hrefs(client.get(location), 'group').each { |group_location| groups << @group_class.new(group_location, client)} groups end |