Exception: Cucumber::CucumberExpressions::AlternativeMayNotExclusivelyContainOptionals

Inherits:
CucumberExpressionError
  • Object
show all
Defined in:
lib/cucumber/cucumber_expressions/errors.rb

Instance Method Summary collapse

Methods inherited from CucumberExpressionError

#build_message, #point_at, #point_at_located

Constructor Details

#initialize(node, expression) ⇒ AlternativeMayNotExclusivelyContainOptionals

Returns a new instance of AlternativeMayNotExclusivelyContainOptionals.



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 37

def initialize(node, expression)
  super(
    build_message(
      node.start,
      expression,
      point_at_located(node),
      'An alternative may not exclusively contain optionals',
      "If you did not mean to use an optional you can use '\\(' to escape the '('"
    )
  )
end