Sha256: e064a5af87e2a0a6681b6d605922f4a45ececc3af91a94785e9801dd9a01e23b

Contents?: true

Size: 630 Bytes

Versions: 62

Compression:

Stored size: 630 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
    end
  end
end

Version data entries

62 entries across 60 versions & 11 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
cucumber-1.2.5 lib/cucumber/ast/features.rb
cucumber-1.2.3 lib/cucumber/ast/features.rb
cucumber-1.2.2 lib/cucumber/ast/features.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
casecumber-1.0.2.1 lib/cucumber/ast/features.rb
casecumber-1.2.1.cb2 lib/cucumber/ast/features.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/lib/cucumber/ast/features.rb
cucumber-1.2.1 lib/cucumber/ast/features.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/ast/features.rb
ftl-0.2.0 vendor/bundle/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb
cucumber-1.2.0 lib/cucumber/ast/features.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/ast/features.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/ast/features.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/ast/features.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/ast/features.rb