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.



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

def initialize(receiver)
  @receiver = receiver
end

Instance Method Details

#doneObject



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

def done
  receiver.done
  self
end

#feature(feature) ⇒ Object



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

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