class Anvil::OptionsDetector

Detect whether the options parser has parsed any option or not in order, for example, to write the required help for them.

Attributes

has_options[RW]

Public Instance Methods

arguments(*_, &_block) click to toggle source
# File lib/anvil/options_detector.rb, line 11
def arguments(*_, &_block)
end
detect_options(&block) click to toggle source
# File lib/anvil/options_detector.rb, line 14
def detect_options(&block)
  instance_eval(&block)

  has_options
end
on(*_, &_block) click to toggle source
# File lib/anvil/options_detector.rb, line 7
def on(*_, &_block)
  self.has_options = true
end