Class: LairClient::Program
- Inherits:
-
Commander::Runner
- Object
- Commander::Runner
- LairClient::Program
- Includes:
- Commander::UI, Commander::UI::AskForClass
- Defined in:
- lib/lair_client/program.rb
Constant Summary collapse
- GLOBAL_OPTIONS =
[ :config, :verbose ]
- BACKTRACE_NOTICE =
' (use --trace to view backtrace)'
Instance Method Summary collapse
-
#initialize(argv = ARGV) ⇒ Program
constructor
A new instance of Program.
Constructor Details
#initialize(argv = ARGV) ⇒ Program
Returns a new instance of Program.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/lair_client/program.rb', line 12 def initialize argv = ARGV super argv program :name, 'lair' program :version, LairClient::VERSION program :description, 'Lair client.' global_option '-c', '--config PATH', 'Use a custom configuration file (defaults to ~/.lair.yml)' global_option '--verbose', 'Increase verbosity' command :scan do |c| c.syntax = 'lair scan' c.description = 'Scan files' c.action do |args,| to_trace_or_not_to_trace .trace do cli.scan *args, extract() end end end end |