Class: Cucumber::Core::Compiler

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

Overview

Compiles the AST into test cases

Instance Method Summary collapse

Constructor Details

#initialize(receiver) ⇒ Compiler

Returns a new instance of Compiler.



12
13
14
# File 'lib/cucumber/core/compiler.rb', line 12

def initialize(receiver)
  @receiver = receiver
end

Instance Method Details

#doneObject



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

def done
  receiver.done
  self
end

#feature(feature) ⇒ Object



16
17
18
19
20
# File 'lib/cucumber/core/compiler.rb', line 16

def feature(feature)
  compiler = FeatureCompiler.new(TestCaseBuilder.new(receiver))
  feature.describe_to(compiler)
  self
end