Exception: Cucumber::CucumberExpressions::TheEndOfLineCannotBeEscaped

Inherits:
CucumberExpressionError 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(expression) ⇒ TheEndOfLineCannotBeEscaped

Returns a new instance of TheEndOfLineCannotBeEscaped.



121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 121

def initialize(expression)
  index = expression.codepoints.length - 1
  super(
    build_message(
      index,
      expression,
      point_at(index),
      'The end of line can not be escaped',
      "You can use '\\\\' to escape the '\\'"
    )
  )
end