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.
14 15 16 |
# File 'lib/gherkin/dialect.rb', line 14 def initialize(spec) @spec = spec end |
Class Method Details
.for(name) ⇒ Object
8 9 10 11 12 |
# File 'lib/gherkin/dialect.rb', line 8 def self.for(name) spec = DIALECTS[name] return nil unless spec new(spec) end |
Instance Method Details
#and_keywords ⇒ Object
54 55 56 |
# File 'lib/gherkin/dialect.rb', line 54 def and_keywords @spec.fetch('and') end |
#background_keywords ⇒ Object
38 39 40 |
# File 'lib/gherkin/dialect.rb', line 38 def background_keywords @spec.fetch('background') end |
#but_keywords ⇒ Object
58 59 60 |
# File 'lib/gherkin/dialect.rb', line 58 def but_keywords @spec.fetch('but') end |
#examples_keywords ⇒ Object
34 35 36 |
# File 'lib/gherkin/dialect.rb', line 34 def examples_keywords @spec.fetch('examples') end |
#feature_keywords ⇒ Object
18 19 20 |
# File 'lib/gherkin/dialect.rb', line 18 def feature_keywords @spec.fetch('feature') end |
#given_keywords ⇒ Object
42 43 44 |
# File 'lib/gherkin/dialect.rb', line 42 def given_keywords @spec.fetch('given') end |
#rule_keywords ⇒ Object
22 23 24 |
# File 'lib/gherkin/dialect.rb', line 22 def rule_keywords @spec.fetch('rule') end |
#scenario_keywords ⇒ Object
26 27 28 |
# File 'lib/gherkin/dialect.rb', line 26 def scenario_keywords @spec.fetch('scenario') end |
#scenario_outline_keywords ⇒ Object
30 31 32 |
# File 'lib/gherkin/dialect.rb', line 30 def scenario_outline_keywords @spec.fetch('scenarioOutline') end |
#then_keywords ⇒ Object
50 51 52 |
# File 'lib/gherkin/dialect.rb', line 50 def then_keywords @spec.fetch('then') end |
#when_keywords ⇒ Object
46 47 48 |
# File 'lib/gherkin/dialect.rb', line 46 def when_keywords @spec.fetch('when') end |