Class: Docuvator::CLI
- Inherits:
-
Object
- Object
- Docuvator::CLI
- Defined in:
- lib/docuvator.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #parse_options ⇒ Object
- #process(file) ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
6 7 8 9 10 11 12 13 |
# File 'lib/docuvator.rb', line 6 def initialize @options = OpenStruct.new( verbose: false, debug: false, ) determine_log_level end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/docuvator.rb', line 5 def @options end |
Instance Method Details
#parse_options ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/docuvator.rb', line 20 def OptionParser.new do |opt| opt.version = VERSION opt.on "-v", "--verbose", "Verbose output (shows INFO level log statements)" do .verbose = true end opt.on "-d", "--debug", "Debug output (shows DEBUG level log statements)" do .debug = true end end.parse! end |