Sha256: 9cbee7473d8c8958877a6aac13f14e7da90b896368df09f7e07d2286cf130555
Contents?: true
Size: 641 Bytes
Versions: 5
Compression:
Stored size: 641 Bytes
Contents
class Lbrt::CLI::Alert < Thor include Lbrt::Utils::CLIHelper class_option :target desc 'peco', 'Show alert by peco' def peco client(Lbrt::Alert).peco end desc 'apply FILE', 'Apply alerts' option :'dry-run', :type => :boolean, :default => false def apply(file) updated = client(Lbrt::Alert).apply(file) unless updated Lbrt::Logger.instance.info('No change'.intense_blue) end end desc 'export [FILE]', 'Export alerts' 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 end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lbrt-0.1.8 | lib/lbrt/cli/alert.rb |
lbrt-0.1.7 | lib/lbrt/cli/alert.rb |
lbrt-0.1.6 | lib/lbrt/cli/alert.rb |
lbrt-0.1.5 | lib/lbrt/cli/alert.rb |
lbrt-0.1.4 | lib/lbrt/cli/alert.rb |