Class: LogView::OptParser

Inherits:
Object
  • Object
show all
Includes:
Colors
Defined in:
lib/log_view/option_parser.rb

Constant Summary

Constants included from Colors

Colors::COLOR_CODES

Instance Method Summary collapse

Methods included from Colors

#paint

Constructor Details

#initializeOptParser

Returns a new instance of OptParser.



5
6
7
8
# File 'lib/log_view/option_parser.rb', line 5

def initialize
  @options = OpenStruct.new
  apply_defaults
end

Instance Method Details

#parse(args, config) ⇒ Object



10
11
12
13
14
# File 'lib/log_view/option_parser.rb', line 10

def parse args, config
  opt_parser = new_opt_parser @options
  opt_parser.parse!(args)
  generate_config config
end