Class: Anvil::OptionsDetector
- Inherits:
-
Object
- Object
- Anvil::OptionsDetector
- Defined in:
- lib/anvil/options_detector.rb
Overview
Detect whether the options parser has parsed any option or not in order, for example, to write the required help for them.
Instance Attribute Summary collapse
-
#has_options ⇒ Object
Returns the value of attribute has_options.
Instance Method Summary collapse
Instance Attribute Details
#has_options ⇒ Object
Returns the value of attribute has_options.
5 6 7 |
# File 'lib/anvil/options_detector.rb', line 5 def @has_options end |
Instance Method Details
#arguments(*_, &_block) ⇒ Object
11 12 |
# File 'lib/anvil/options_detector.rb', line 11 def arguments(*_, &_block) end |
#detect_options(&block) ⇒ Object
14 15 16 17 18 |
# File 'lib/anvil/options_detector.rb', line 14 def (&block) instance_eval(&block) end |
#on(*_, &_block) ⇒ Object
7 8 9 |
# File 'lib/anvil/options_detector.rb', line 7 def on(*_, &_block) self. = true end |