Class: Pwnix::Api::Client::Shell
- Inherits:
-
Object
- Object
- Pwnix::Api::Client::Shell
show all
- Includes:
- HTTParty, HTTPartyTime
- Defined in:
- lib/pwnix-api-client/shell.rb
Instance Method Summary
collapse
#clear_errors, #errors, #has_errors?, included, #last_error, #safe_api_call
Constructor Details
#initialize(shell_name) ⇒ Shell
Returns a new instance of Shell.
8
9
10
|
# File 'lib/pwnix-api-client/shell.rb', line 8
def initialize(shell_name)
@shell_name = shell_name
end
|
Instance Method Details
20
21
22
|
# File 'lib/pwnix-api-client/shell.rb', line 20
def configure(config={}) safe_api_call("/shells/#{@shell_name}/configure", config )
end
|
#disable ⇒ Object
28
29
30
|
# File 'lib/pwnix-api-client/shell.rb', line 28
def disable
safe_api_call("/shells/#{@shell_name}/disable")
end
|
#enable ⇒ Object
24
25
26
|
# File 'lib/pwnix-api-client/shell.rb', line 24
def enable
safe_api_call("/shells/#{@shell_name}/enable")
end
|
#running? ⇒ Boolean
16
17
18
|
# File 'lib/pwnix-api-client/shell.rb', line 16
def running?
safe_api_call("/shells/#{@shell_name}/running")
end
|
#status ⇒ Object
12
13
14
|
# File 'lib/pwnix-api-client/shell.rb', line 12
def status
safe_api_call("/shells/#{@shell_name}/status")
end
|