Class: Doubleshot::CLI::Options
- Defined in:
- lib/doubleshot/cli/options.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Options
constructor
A new instance of Options.
- #parse!(args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Options
Returns a new instance of Options.
20 21 22 23 24 |
# File 'lib/doubleshot/cli/options.rb', line 20 def initialize super @parser = OptionParser.new yield self end |
Class Method Details
.__forward__(*methods) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/doubleshot/cli/options.rb', line 8 def self.__forward__(*methods) methods.each do |method| define_method(method) do |*args, &b| @parser.send(method, *args, &b) end end end |