Class: Cucumber::Tree::Features

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb

Instance Method Summary collapse

Constructor Details

#initializeFeatures

Returns a new instance of Features.



4
5
6
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb', line 4

def initialize
  @features = []
end

Instance Method Details

#<<(feature) ⇒ Object



12
13
14
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb', line 12

def <<(feature)
  @features << feature
end

#accept(visitor) ⇒ Object



16
17
18
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb', line 16

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

#lengthObject



8
9
10
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb', line 8

def length
  @features.length
end