Class: Cucumber::Core::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/core/compiler.rb

Overview

Compiles the Pickles into test cases

Instance Method Summary collapse

Constructor Details

#initialize(receiver, gherkin_query, event_bus) ⇒ Compiler

Returns a new instance of Compiler.



20
21
22
23
24
25
# File 'lib/cucumber/core/compiler.rb', line 20

def initialize(receiver, gherkin_query, event_bus)
  @receiver = receiver
  @id_generator = Cucumber::Messages::Helpers::IdGenerator::UUID.new
  @gherkin_query = gherkin_query
  @event_bus = event_bus
end

Instance Method Details

#doneObject



32
33
34
35
# File 'lib/cucumber/core/compiler.rb', line 32

def done
  receiver.done
  self
end

#pickle(pickle) ⇒ Object



27
28
29
30
# File 'lib/cucumber/core/compiler.rb', line 27

def pickle(pickle)
  test_case = create_test_case(pickle)
  test_case.describe_to(receiver)
end