Class: Feedigest::OptionParser
- Inherits:
-
Object
- Object
- Feedigest::OptionParser
- Defined in:
- lib/feedigest/option_parser.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
-
#initialize(args) ⇒ OptionParser
constructor
A new instance of OptionParser.
- #options ⇒ Object
Constructor Details
#initialize(args) ⇒ OptionParser
Returns a new instance of OptionParser.
7 8 9 |
# File 'lib/feedigest/option_parser.rb', line 7 def initialize(args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/feedigest/option_parser.rb', line 5 def args @args end |
Instance Method Details
#options ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/feedigest/option_parser.rb', line 11 def = parser = Slop::Parser.new() begin parser.parse(args).to_hash rescue Slop::Error => e puts "error: #{e.}" puts puts exit end end |