Sha256: 3f847db613407c6ba53e8b4b74faa41afcae86589b1f9aee3d114ba6e524e540

Contents?: true

Size: 548 Bytes

Versions: 26

Compression:

Stored size: 548 Bytes

Contents

require 'gherkin/tag_expression'

module Cucumber
  module Ast
    class Tags #:nodoc:
      attr_reader :tags

      def initialize(line, tags)
        @line, @tags = line, tags
      end

      def accept(visitor)
        return if Cucumber.wants_to_quit
        @tags.each do |tag|
          visitor.visit_tag_name(tag.name)
        end
      end

      def accept_hook?(hook)
        Gherkin::TagExpression.new(hook.tag_expressions).eval(@tags)
      end

      def to_sexp
        @tags.map{|tag| [:tag, tag.name]}
      end
    end
  end
end

Version data entries

26 entries across 24 versions & 8 rubygems

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