Class: Localeapp::CLI::Remove
Instance Method Summary
collapse
Methods included from ApiCall
#api_call
Methods inherited from Command
#initialize, #initialize_config, #load_config_file, #set_command_line_arguments
Instance Method Details
#execute(key, *rest) ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/localeapp/cli/remove.rb', line 6
def execute(key, *rest)
@output.puts "Localeapp rm"
@output.puts ""
@output.puts "Remove key: #{key}"
api_call :remove,
:url_options => { :key => key },
:success => :report_success,
:failure => :report_failure,
:max_connection_attempts => 3
end
|
#report_failure(response) ⇒ Object
21
22
23
|
# File 'lib/localeapp/cli/remove.rb', line 21
def report_failure(response)
@output.puts "Failed!"
end
|
#report_success(response) ⇒ Object
17
18
19
|
# File 'lib/localeapp/cli/remove.rb', line 17
def report_success(response)
@output.puts "Success!"
end
|