Class: Cucumber::Core::Gherkin::Parser
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/parser.rb
Instance Method Summary collapse
- #document(document) ⇒ Object
- #done ⇒ Object
- #gherkin_options(document) ⇒ Object
-
#initialize(receiver, event_bus, gherkin_query) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(receiver, event_bus, gherkin_query) ⇒ Parser
Returns a new instance of Parser.
13 14 15 16 17 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/parser.rb', line 13 def initialize(receiver, event_bus, gherkin_query) @receiver = receiver @event_bus = event_bus @gherkin_query = gherkin_query end |
Instance Method Details
#document(document) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/parser.rb', line 19 def document(document) = ::Gherkin.from_source(document.uri, document.body, (document)) .each do || event_bus.envelope() gherkin_query.update() if !.gherkin_document.nil? event_bus.gherkin_source_parsed(.gherkin_document) elsif !.pickle.nil? receiver.pickle(.pickle) elsif .parse_error raise Core::Gherkin::ParseError.new("#{document.uri}: #{.parse_error.}") else raise "Unknown message: #{.to_hash}" end end end |
#done ⇒ Object
45 46 47 48 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/parser.rb', line 45 def done receiver.done self end |
#gherkin_options(document) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/parser.rb', line 36 def (document) { default_dialect: document.language, include_source: false, include_gherkin_document: true, include_pickles: true } end |