Sha256: 45139042381fca9a4bd4291164fed79a1ef1d7bff810c2af18405134b460ec66

Contents?: true

Size: 466 Bytes

Versions: 15

Compression:

Stored size: 466 Bytes

Contents

module Cucumber
  module Ast
    class Features
      include Enumerable

      def initialize
        @features = []
      end

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

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

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

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
aslakhellesoy-cucumber-0.2.0.3 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.0.4 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.1 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.2.1 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.2.2 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.2 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.3.1 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.3.2 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.3.3 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.2.3 lib/cucumber/ast/features.rb
fcoury-cucumber-0.2.3.1 lib/cucumber/ast/features.rb
kosmas58-cucumber-0.2.2.1 lib/cucumber/ast/features.rb
cucumber-0.2.2 lib/cucumber/ast/features.rb
cucumber-0.2.1 lib/cucumber/ast/features.rb
cucumber-0.2.3 lib/cucumber/ast/features.rb