Class: Lbrt::CLI::Service
Constant Summary
Utils::CLIHelper::REGEXP_OPTIONS
Instance Method Summary
collapse
#client
Instance Method Details
#apply(file) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/lbrt/cli/service.rb', line 13
def apply(file)
updated = client(Lbrt::Service).apply(file)
unless updated
Lbrt::Logger.instance.info('No change'.intense_blue)
end
end
|
#export(file = nil) ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/lbrt/cli/service.rb', line 22
def export(file = nil)
dsl = client(Lbrt::Service).export
if file.nil? or file == '-'
puts dsl
else
open(file, 'wb') {|f| f.puts dsl }
end
end
|
#list ⇒ Object
7
8
9
|
# File 'lib/lbrt/cli/service.rb', line 7
def list
client(Lbrt::Service).list
end
|