Class: Farseer::Opt
Instance Method Summary collapse
-
#initialize(parser) ⇒ Opt
constructor
A new instance of Opt.
- #parse(input) ⇒ Object
Methods included from MapFactory
Constructor Details
#initialize(parser) ⇒ Opt
7 8 9 10 |
# File 'lib/farseer/opt.rb', line 7 def initialize(parser) @parser = parser freeze end |
Instance Method Details
#parse(input) ⇒ Object
12 13 14 15 16 |
# File 'lib/farseer/opt.rb', line 12 def parse(input) @parser .parse(input) .map_none { Result.new('', input) } end |