Class: BERGCloud::Command
- Inherits:
-
Object
- Object
- BERGCloud::Command
- Defined in:
- lib/bergcloud/command.rb
Instance Attribute Summary collapse
-
#command_id ⇒ Object
readonly
Returns the value of attribute command_id.
Instance Method Summary collapse
- #delete ⇒ Object
- #info ⇒ Object
-
#initialize(command_id) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(command_id) ⇒ Command
Returns a new instance of Command.
6 7 8 |
# File 'lib/bergcloud/command.rb', line 6 def initialize(command_id) @command_id = command_id end |
Instance Attribute Details
#command_id ⇒ Object (readonly)
Returns the value of attribute command_id.
4 5 6 |
# File 'lib/bergcloud/command.rb', line 4 def command_id @command_id end |
Instance Method Details
#delete ⇒ Object
14 15 16 |
# File 'lib/bergcloud/command.rb', line 14 def delete BERGCloud::Client.delete("/commands/#{@command_id}").body || {} end |
#info ⇒ Object
10 11 12 |
# File 'lib/bergcloud/command.rb', line 10 def info BERGCloud::Client.get("/commands/#{@command_id}").body || {} end |