Sha256: 121f7a535614b9459e0f6158c63d32907f3d33426e2d11d023b1c5fd95415dfb

Contents?: true

Size: 593 Bytes

Versions: 35

Compression:

Stored size: 593 Bytes

Contents

require 'gherkin/tag_expression'

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

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

      def accept(visitor)
        return if Cucumber.wants_to_quit
        @tag_names.each do |tag_name|
          visitor.visit_tag_name(tag_name)
        end
      end

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

      def to_sexp
        @tag_names.map{|tag_name| [:tag, tag_name]}
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 5 rubygems

Version Path
casecumber-1.0.2.1 lib/cucumber/ast/tags.rb
cucumber-1.1.4 lib/cucumber/ast/tags.rb
cucumber-1.1.3 lib/cucumber/ast/tags.rb
cucumber-1.1.2 lib/cucumber/ast/tags.rb
cucumber-1.1.1 lib/cucumber/ast/tags.rb
js-log-cucumber-1.0.2 lib/cucumber/ast/tags.rb
cucumber-1.1.0 lib/cucumber/ast/tags.rb
cucumber-1.0.6 lib/cucumber/ast/tags.rb
cucumber-1.0.5 lib/cucumber/ast/tags.rb
cucumber-1.0.4 lib/cucumber/ast/tags.rb
cucumber-1.0.3 lib/cucumber/ast/tags.rb
cucumber-1.0.2 lib/cucumber/ast/tags.rb
cucumber-1.0.1 lib/cucumber/ast/tags.rb
cucumber-1.0.0 lib/cucumber/ast/tags.rb
cucumber-0.8.7 lib/cucumber/ast/tags.rb
cucumber-0.8.6 lib/cucumber/ast/tags.rb
cucumber-0.10.7 lib/cucumber/ast/tags.rb
cucumber-0.10.6 lib/cucumber/ast/tags.rb
cucumber-0.10.5 lib/cucumber/ast/tags.rb
cucumber-0.10.3 lib/cucumber/ast/tags.rb