Class: BERGCloud::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/bergcloud/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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

#deleteObject



14
15
16
# File 'lib/bergcloud/command.rb', line 14

def delete
  BERGCloud::Client.delete("/commands/#{@command_id}").body || {}
end

#infoObject



10
11
12
# File 'lib/bergcloud/command.rb', line 10

def info
  BERGCloud::Client.get("/commands/#{@command_id}").body || {}
end