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.16.5 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.1 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.10 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.11 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.12 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.13 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.14 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.15 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.17 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.18 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.19 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.2 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.20 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.21 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.22 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.23 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.3 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.5 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.6 lib/cucumber/ast/filter.rb
aslakhellesoy-cucumber-0.1.99.7 lib/cucumber/ast/filter.rb