Class Gherkin::I18n
In: lib/gherkin/i18n.rb
Parent: Object

Methods

Included Modules

Rubify

Constants

LexerNotFound = Class.new(LoadError)
FEATURE_ELEMENT_KEYS = %w{feature background scenario scenario_outline examples}
STEP_KEYWORD_KEYS = %w{given when then and but}
KEYWORD_KEYS = FEATURE_ELEMENT_KEYS + STEP_KEYWORD_KEYS
LANGUAGES = JSON.parse(File.open(File.dirname(__FILE__) + '/i18n.json', 'r:utf-8').read)

Attributes

iso_code  [R] 

Public Class methods

Used by code generators for other lexer tools like pygments lexer and textmate bundle

Returns all keyword translations and aliases of keywords, escaped and joined with |. This method is convenient for editor support and syntax highlighting engines for Gherkin, where there is typically a code generation tool to generate regular expressions for recognising the various I18n translations of Gherkin‘s keywords.

The keywords arguments can be one of :feature, :background, :scenario, :scenario_outline, :examples, :step.

Public Instance methods

Keywords that can be used in code

Keywords that can be used in Gherkin source

[Validate]