Class: TomDoc::CLI
- Inherits:
-
Object
- Object
- TomDoc::CLI
- Defined in:
- lib/tomdoc/cli.rb
Class Method Summary collapse
-
.options(&block) ⇒ Object
DSL Magics.
-
.parse_options(args) ⇒ Object
Actions.
Instance Method Summary collapse
Class Method Details
.options(&block) ⇒ Object
DSL Magics
9 10 11 |
# File 'lib/tomdoc/cli.rb', line 9 def self.(&block) block ? (@options = block) : @options end |
.parse_options(args) ⇒ Object
Actions
113 114 115 |
# File 'lib/tomdoc/cli.rb', line 113 def self.(args) new.(args) end |
Instance Method Details
#options ⇒ Object
13 14 15 16 17 |
# File 'lib/tomdoc/cli.rb', line 13 def OptionParser.new do |opts| opts.instance_eval(&self.class.) end end |
#parse_options(args) ⇒ Object
117 118 119 |
# File 'lib/tomdoc/cli.rb', line 117 def (args) .parse(args) end |
#pp(*args) ⇒ Object
19 20 21 22 |
# File 'lib/tomdoc/cli.rb', line 19 def pp(*args) require 'pp' super end |