Class: Naginata::CLI
- Inherits:
-
Thor
- Object
- Thor
- Naginata::CLI
show all
- Defined in:
- lib/naginata/cli.rb
Defined Under Namespace
Classes: Fetch, Hosts, Init, LocalAbstract, Notification, RemoteAbstract, Services
Instance Method Summary
collapse
Instance Method Details
#fetch ⇒ Object
39
40
41
42
|
# File 'lib/naginata/cli.rb', line 39
def fetch
require 'naginata/cli/fetch'
CLI::Fetch.new(options).execute
end
|
#hosts(*patterns) ⇒ Object
48
49
50
51
52
53
54
55
|
# File 'lib/naginata/cli.rb', line 48
def hosts(*patterns)
if patterns.empty? and !options[:all_hosts]
help(:hosts)
exit(1)
end
require 'naginata/cli/hosts'
CLI::Hosts.new(options.merge(patterns: patterns)).execute
end
|
#init ⇒ Object
15
16
17
18
|
# File 'lib/naginata/cli.rb', line 15
def init
require 'naginata/cli/init'
CLI::Init.new(options).execute
end
|
#notification(*patterns) ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'lib/naginata/cli.rb', line 28
def notification(*patterns)
if patterns.empty? and options.empty?
help(:notification)
exit(1)
end
require 'naginata/cli/notification'
CLI::Notification.new(options.merge(patterns: patterns)).execute
end
|
#services(*patterns) ⇒ Object
62
63
64
65
66
67
68
69
|
# File 'lib/naginata/cli.rb', line 62
def services(*patterns)
if patterns.empty? and !options[:all_hosts]
help(:services)
exit(1)
end
require 'naginata/cli/services'
CLI::Services.new(options.merge(patterns: patterns)).execute
end
|