Class: Lbrt::CLI::Alert
Constant Summary
Utils::CLIHelper::REGEXP_OPTIONS
Instance Method Summary
collapse
#client
Instance Method Details
#apply(file) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/lbrt/cli/alert.rb', line 22
def apply(file)
updated = client(Lbrt::Alert).apply(file)
unless updated
Lbrt::Logger.instance.info('No change'.intense_blue)
end
end
|
#export(file = nil) ⇒ Object
31
32
33
34
35
36
37
38
39
|
# File 'lib/lbrt/cli/alert.rb', line 31
def export(file = nil)
dsl = client(Lbrt::Alert).export
if file.nil? or file == '-'
puts dsl
else
open(file, 'wb') {|f| f.puts dsl }
end
end
|
#list ⇒ Object
9
10
11
|
# File 'lib/lbrt/cli/alert.rb', line 9
def list
client(Lbrt::Alert).list
end
|
#peco ⇒ Object
16
17
18
|
# File 'lib/lbrt/cli/alert.rb', line 16
def peco
client(Lbrt::Alert).peco
end
|