Class: Cucumber::Ast::Features

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/cucumber/ast/features.rb

Instance Method Summary collapse

Constructor Details

#initializeFeatures

Returns a new instance of Features.



6
7
8
# File 'lib/cucumber/ast/features.rb', line 6

def initialize
  @features = []
end

Instance Method Details

#accept(visitor) ⇒ Object



19
20
21
22
23
# File 'lib/cucumber/ast/features.rb', line 19

def accept(visitor)
  @features.each do |feature|
    visitor.visit_feature(feature)
  end
end

#add_feature(feature) ⇒ Object



14
15
16
17
# File 'lib/cucumber/ast/features.rb', line 14

def add_feature(feature)
  feature.features = self
  @features << feature
end

#each(&proc) ⇒ Object



10
11
12
# File 'lib/cucumber/ast/features.rb', line 10

def each(&proc)
  @features.each(&proc)
end