Class: Joyent::Key
- Inherits:
-
Object
- Object
- Joyent::Key
- Defined in:
- lib/joyent/key.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(connection, attributes) ⇒ Key
constructor
A new instance of Key.
Constructor Details
#initialize(connection, attributes) ⇒ Key
Returns a new instance of Key.
5 6 7 8 9 10 |
# File 'lib/joyent/key.rb', line 5 def initialize(connection, attributes) @connection = connection @name = attributes["name"] @key = attributes["key"] end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/joyent/key.rb', line 3 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/joyent/key.rb', line 3 def name @name end |
Instance Method Details
#delete ⇒ Object
12 13 14 |
# File 'lib/joyent/key.rb', line 12 def delete @connection.execute(:delete, "/keys/#{name}") end |