Sha256: f472bb81f59844bd568221325b8e1215736dc825ac1151233b35bd72fd7e5749

Contents?: true

Size: 520 Bytes

Versions: 25

Compression:

Stored size: 520 Bytes

Contents

module Cucumber
  module Ast
    class Filter
      def initialize(options)
        @options = options
      end
      
      def matched?(node)
        matched_by_tags?(node) &&
        matched_by_scenario_names?(node)
      end
      
      def matched_by_tags?(node)
        @options[:tags].empty? || node.tagged_with?(@options[:tags])
      end

      def matched_by_scenario_names?(node)
        @options[:scenario_names].empty? || node.matches_scenario_names?(@options[:scenario_names])
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
aslakhellesoy-cucumber-0.1.99.8 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.9 lib/cucumber/ast/filter.rb
kosmas58-cucumber-0.1.99.21 lib/cucumber/ast/filter.rb
kosmas58-cucumber-0.1.99.23 lib/cucumber/ast/filter.rb
notch8-cucumber-0.1.99.23 lib/cucumber/ast/filter.rb