Class: Shared::Groups
- Inherits:
-
MutableCollection
- Object
- Resource
- Collection
- MutableCollection
- Shared::Groups
- Defined in:
- lib/vas/shared/groups.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#create(name, nodes) ⇒ Object
Creates a Group named
name
from the givennodes
. -
#initialize(location, client, group_class) ⇒ Groups
constructor
:nodoc:.
Methods inherited from MutableCollection
Methods inherited from Collection
Constructor Details
#initialize(location, client, group_class) ⇒ Groups
:nodoc:
22 23 24 |
# File 'lib/vas/shared/groups.rb', line 22 def initialize(location, client, group_class) #:nodoc: super(location, client, "groups", group_class) end |
Instance Method Details
#create(name, nodes) ⇒ Object
Creates a Group named name
from the given nodes
.
27 28 29 30 31 |
# File 'lib/vas/shared/groups.rb', line 27 def create(name, nodes) node_locations = [] nodes.each { |node| node_locations << node.location } entry_class.new(client.post(location, {:name => name, :nodes => node_locations}, "group"), client) end |