Module: Spice::Connection::Nodes
- Included in:
- Spice, Spice::Connection
- Defined in:
- lib/spice/connection/nodes.rb
Instance Method Summary (collapse)
-
- (Spice::Node) node(name)
Retrieve a single client.
-
- (Array<Spice::Node>) nodes(options = {})
A collection of nodes.
Instance Method Details
- (Spice::Node) node(name)
Retrieve a single client
22 23 24 25 |
# File 'lib/spice/connection/nodes.rb', line 22 def node(name) node_attributes = connection.get("/nodes/#{name}").body Spice::Node.new(node_attributes) end |
- (Array<Spice::Node>) nodes(options = {})
A collection of nodes
12 13 14 |
# File 'lib/spice/connection/nodes.rb', line 12 def nodes(={}) connection.search('node', ) end |