Sha256: d239993198898b61ea487c6ef0bb6007484414fd443fd06fb5fd7ee2ad05e79d

Contents?: true

Size: 552 Bytes

Versions: 25

Compression:

Stored size: 552 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).evaluate(@tags)
      end

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

Version data entries

25 entries across 23 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/lib/cucumber/ast/tags.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/lib/cucumber/ast/tags.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/lib/cucumber/ast/tags.rb
cucumber-1.3.20 lib/cucumber/ast/tags.rb
cucumber-1.3.19 lib/cucumber/ast/tags.rb
cucumber-1.3.18 lib/cucumber/ast/tags.rb
cucumber-1.3.17 lib/cucumber/ast/tags.rb
cucumber-1.3.16 lib/cucumber/ast/tags.rb
cucumber-1.3.15 lib/cucumber/ast/tags.rb
cucumber-1.3.14 lib/cucumber/ast/tags.rb
cucumber-1.3.13 lib/cucumber/ast/tags.rb
cucumber-1.3.12 lib/cucumber/ast/tags.rb
cucumber-1.3.11 lib/cucumber/ast/tags.rb
cucumber-1.3.10 lib/cucumber/ast/tags.rb
cucumber-1.3.9 lib/cucumber/ast/tags.rb
cucumber-1.3.8 lib/cucumber/ast/tags.rb
cucumber-1.3.7 lib/cucumber/ast/tags.rb
cucumber-1.3.6 lib/cucumber/ast/tags.rb
cucumber-1.3.5 lib/cucumber/ast/tags.rb
cucumber-1.3.4 lib/cucumber/ast/tags.rb