Sha256: d7fde1ed1446674f78b8d6958609b9e9d9cfee3eb30825f775a84ea5c1b9345c

Contents?: true

Size: 739 Bytes

Versions: 22

Compression:

Stored size: 739 Bytes

Contents

module Cucumber
  module Ast
    class Features #:nodoc:
      include Enumerable

      attr_reader :duration

      def initialize
        @features = []
      end

      def [](index)
        @features[index]
      end

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

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

      def accept(visitor)
        return if Cucumber.wants_to_quit
        start = Time.now
        self.each do |feature|
          visitor.visit_feature(feature)
        end
        @duration = Time.now - start
      end

      def tag_locations(tag)
        @features.map{|feature| feature.tag_locations(tag)}.flatten
      end

    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
cucumber-0.8.3 lib/cucumber/ast/features.rb
cucumber-0.8.2 lib/cucumber/ast/features.rb
cucumber-0.8.1 lib/cucumber/ast/features.rb
cucumber-0.8.0 lib/cucumber/ast/features.rb
cucumber-0.7.3 lib/cucumber/ast/features.rb
cucumber-0.7.2 lib/cucumber/ast/features.rb
cucumber-0.7.1 lib/cucumber/ast/features.rb
cucumber-0.7.0 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.8 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.7 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.6 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.5 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.4 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.3 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.2 lib/cucumber/ast/features.rb
cucumber-0.7.0.beta.1 lib/cucumber/ast/features.rb
cucumber-0.6.4 lib/cucumber/ast/features.rb
cucumber-0.6.3 lib/cucumber/ast/features.rb
davidtrogers-cucumber-0.6.2 lib/cucumber/ast/features.rb
cucumber-0.6.2 lib/cucumber/ast/features.rb