Class: Magellan::Cli::Direct

Inherits:
Base
  • Object
show all
Defined in:
lib/magellan/cli/direct.rb

Instance Method Summary collapse

Methods inherited from Base

command_help, help, log_error, log_info, log_success, log_verbose, log_warning, puts_with_color, sorted_commands, sorted_printable_commands, update_common_help_message

Instance Method Details

#delete(path) ⇒ Object



25
26
27
# File 'lib/magellan/cli/direct.rb', line 25

def delete(path)
  delete(path)
end

#get(path) ⇒ Object



9
10
11
12
# File 'lib/magellan/cli/direct.rb', line 9

def get(path)
  r = get_json(path)
  $stdout.puts(JSON.pretty_generate(r))
end

#post(path, params = nil) ⇒ Object



15
16
17
# File 'lib/magellan/cli/direct.rb', line 15

def post(path, params = nil)
  post_json(path)
end

#put(path, params = nil) ⇒ Object



20
21
22
# File 'lib/magellan/cli/direct.rb', line 20

def put(path, params = nil)
  put_json(path)
end