Class: Stackflame::Client::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/stackflame/client/cli.rb

Constant Summary collapse

DEFAULT_TASK =
:request

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object (private)



17
18
19
20
# File 'lib/stackflame/client/cli.rb', line 17

def method_missing(*args)
  return super(*args) if args.length > 1
  send(DEFAULT_TASK, args.first.to_s)
end

Instance Method Details

#request(url) ⇒ Object



11
12
13
# File 'lib/stackflame/client/cli.rb', line 11

def request(url)
  Client.post(url)
end