Module: Cucumber::JsSupport

Defined in:
lib/cucumber/js_support/js_language.rb,
lib/cucumber/js_support/js_snippets.rb

Defined Under Namespace

Modules: JsSnippets Classes: JsArg, JsHook, JsLanguage, JsStepDefinition, JsTransform, JsWorld

Class Method Summary collapse

Class Method Details

.argument_safe_string(string) ⇒ Object


13
14
15
16
# File 'lib/cucumber/js_support/js_language.rb', line 13

def self.argument_safe_string(string)
  arg_string = string.to_s.gsub(/[']/, '\\\\\'')
  arg_string.gsub("\n", '\n')
end