Class: Sumcli::Commands::G

Inherits:
Thor
  • Object
show all
Defined in:
lib/sumcli/commands/g.rb,
lib/sumcli/commands/g/endpoint.rb

Defined Under Namespace

Classes: Endpoint

Instance Method Summary collapse

Instance Method Details

#endpoint(name, method = nil, route = nil) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/sumcli/commands/g.rb', line 14

def endpoint(name, method = nil, route = nil)
  if options[:help]
    invoke :help, ['endpoint']
  else
    require_relative 'g/endpoint'
    Sumcli::Commands::G::Endpoint.new(name, method, route, options).execute
  end
end