Class: Notes::Options::OptionParser
- Inherits:
-
Object
- Object
- Notes::Options::OptionParser
- Defined in:
- lib/notes/controller/option_parser.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ OptionParser
constructor
A new instance of OptionParser.
- #parse ⇒ Object
Constructor Details
#initialize(args) ⇒ OptionParser
Returns a new instance of OptionParser.
4 5 6 |
# File 'lib/notes/controller/option_parser.rb', line 4 def initialize(args) @parsed_options = {} end |
Instance Method Details
#parse ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/notes/controller/option_parser.rb', line 8 def parse @parsed_options = Trollop:: do Options..each do |option| opt option.name, option.description, option. end end @parsed_options end |