Class: Gherkin::Dialect
- Inherits:
-
Object
- Object
- Gherkin::Dialect
- Defined in:
- lib/gherkin/dialect.rb
Class Method Summary collapse
Instance Method Summary collapse
- #and_keywords ⇒ Object
- #background_keywords ⇒ Object
- #but_keywords ⇒ Object
- #examples_keywords ⇒ Object
- #feature_keywords ⇒ Object
- #given_keywords ⇒ Object
-
#initialize(spec) ⇒ Dialect
constructor
A new instance of Dialect.
- #rule_keywords ⇒ Object
- #scenario_keywords ⇒ Object
- #scenario_outline_keywords ⇒ Object
- #then_keywords ⇒ Object
- #when_keywords ⇒ Object
Constructor Details
#initialize(spec) ⇒ Dialect
Returns a new instance of Dialect.
15 16 17 |
# File 'lib/gherkin/dialect.rb', line 15 def initialize(spec) @spec = spec end |
Class Method Details
.for(name) ⇒ Object
9 10 11 12 13 |
# File 'lib/gherkin/dialect.rb', line 9 def self.for(name) spec = DIALECTS[name] return nil unless spec new(spec) end |
Instance Method Details
#and_keywords ⇒ Object
55 56 57 |
# File 'lib/gherkin/dialect.rb', line 55 def and_keywords @spec.fetch('and') end |
#background_keywords ⇒ Object
39 40 41 |
# File 'lib/gherkin/dialect.rb', line 39 def background_keywords @spec.fetch('background') end |
#but_keywords ⇒ Object
59 60 61 |
# File 'lib/gherkin/dialect.rb', line 59 def but_keywords @spec.fetch('but') end |
#examples_keywords ⇒ Object
35 36 37 |
# File 'lib/gherkin/dialect.rb', line 35 def examples_keywords @spec.fetch('examples') end |
#feature_keywords ⇒ Object
19 20 21 |
# File 'lib/gherkin/dialect.rb', line 19 def feature_keywords @spec.fetch('feature') end |
#given_keywords ⇒ Object
43 44 45 |
# File 'lib/gherkin/dialect.rb', line 43 def given_keywords @spec.fetch('given') end |
#rule_keywords ⇒ Object
23 24 25 |
# File 'lib/gherkin/dialect.rb', line 23 def rule_keywords @spec.fetch('rule') end |
#scenario_keywords ⇒ Object
27 28 29 |
# File 'lib/gherkin/dialect.rb', line 27 def scenario_keywords @spec.fetch('scenario') end |
#scenario_outline_keywords ⇒ Object
31 32 33 |
# File 'lib/gherkin/dialect.rb', line 31 def scenario_outline_keywords @spec.fetch('scenarioOutline') end |
#then_keywords ⇒ Object
51 52 53 |
# File 'lib/gherkin/dialect.rb', line 51 def then_keywords @spec.fetch('then') end |
#when_keywords ⇒ Object
47 48 49 |
# File 'lib/gherkin/dialect.rb', line 47 def when_keywords @spec.fetch('when') end |