Class: Joyent::Keys
- Inherits:
-
Object
- Object
- Joyent::Keys
- Defined in:
- lib/joyent/keys.rb
Instance Method Summary collapse
- #create(name, key) ⇒ Object
- #get(name) ⇒ Object
-
#initialize(connection) ⇒ Keys
constructor
A new instance of Keys.
- #list ⇒ Object
Constructor Details
#initialize(connection) ⇒ Keys
Returns a new instance of Keys.
3 4 5 |
# File 'lib/joyent/keys.rb', line 3 def initialize(connection) @connection = connection end |
Instance Method Details
#create(name, key) ⇒ Object
15 16 17 |
# File 'lib/joyent/keys.rb', line 15 def create(name, key) Joyent::Key.new(@connection, @connection.execute(:post, "/keys", {:name => name, :key => key})) end |