Class: Sumcli::Commands::Add
- Inherits:
-
Thor
- Object
- Thor
- Sumcli::Commands::Add
show all
- Defined in:
- lib/sumcli/commands/add.rb,
lib/sumcli/commands/add/service.rb,
lib/sumcli/commands/add/endpoint.rb,
lib/sumcli/commands/add/service/postgres.rb
Defined Under Namespace
Classes: Endpoint, Service
Instance Method Summary
collapse
Instance Method Details
#endpoint(name, method = nil, route = nil) ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/sumcli/commands/add.rb', line 26
def endpoint(name, method = nil, route = nil)
if options[:help]
invoke :help, ['endpoint']
else
require_relative 'add/endpoint'
Sumcli::Commands::Add::Endpoint.new(name, method, route, options).execute
end
end
|
#service(name, version = nil) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/sumcli/commands/add.rb', line 14
def service(name, version = nil)
if options[:help]
invoke :help, ['service']
else
require_relative 'add/service'
Sumcli::Commands::Add::Service.new(name, version, options).execute
end
end
|