Sha256: 39b00fb96b5074505baef92438f71c849d6a77694e32335c128ef06959a460ae

Contents?: true

Size: 619 Bytes

Versions: 9

Compression:

Stored size: 619 Bytes

Contents

module Cucumber
  module Ast
    class Features
      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_interrupted
        start = Time.now
        self.each do |feature|
          visitor.visit_feature(feature)
        end
        @duration = Time.now - start
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
aslakhellesoy-cucumber-0.3.92 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.3.93.1 lib/cucumber/ast/features.rb
aslakhellesoy-cucumber-0.3.93 lib/cucumber/ast/features.rb
kosmas58-cucumber-0.3.92 lib/cucumber/ast/features.rb
kosmas58-cucumber-0.3.93.1 lib/cucumber/ast/features.rb
square-cucumber-0.3.93.1.1 lib/cucumber/ast/features.rb
square-cucumber-0.3.93.1 lib/cucumber/ast/features.rb
cucumber-0.3.92 lib/cucumber/ast/features.rb
cucumber-0.3.93 lib/cucumber/ast/features.rb