Class: Joyent::Datasets

Inherits:
Object
  • Object
show all
Defined in:
lib/joyent/datasets.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Datasets

Returns a new instance of Datasets.



3
4
5
# File 'lib/joyent/datasets.rb', line 3

def initialize(connection)
  @connection = connection
end

Instance Method Details

#get(name) ⇒ Object



11
12
13
# File 'lib/joyent/datasets.rb', line 11

def get(name)
  Joyent::Dataset.new(@connection.execute(:get, "/datasets/#{name}"))
end

#listObject



7
8
9
# File 'lib/joyent/datasets.rb', line 7

def list
  @connection.execute(:get, "/datasets").map{|attributes| Joyent::Dataset.new(attributes)}
end