Class: Mutant::Expression::Parser Private
- Inherits:
-
Object
- Object
- Mutant::Expression::Parser
- Defined in:
- lib/mutant/expression/parser.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#call(input) ⇒ Either<String, Expression>?
private
Parse expression.
Instance Method Details
#call(input) ⇒ Either<String, Expression>?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parse expression
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mutant/expression/parser.rb', line 17 def call(input) case expressions(input) in [] Either::Left.new("Expression: #{input.inspect} is invalid") in [expression] Either::Right.new(expression) else Either::Left.new("Expression: #{input.inspect} is ambiguous") end end |