Sha256: 2c3494ea40a5564da7a4940b31b658a5edd22e051e54d67b1d26d1464ae6869e

Contents?: true

Size: 408 Bytes

Versions: 10

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

module Leftovers
  module Matchers
    class NodeType
      # :nocov:
      using ::Leftovers::Backports::SetCaseEq if defined?(::Leftovers::Backports::SetCaseEq)
      # :nocov:

      def initialize(type_matcher)
        @type_matcher = type_matcher

        freeze
      end

      def ===(node)
        @type_matcher === node.type
      end

      freeze
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
leftovers-0.5.5 lib/leftovers/matchers/node_type.rb
leftovers-0.5.4 lib/leftovers/matchers/node_type.rb
leftovers-0.5.3 lib/leftovers/matchers/node_type.rb
leftovers-0.5.2 lib/leftovers/matchers/node_type.rb
leftovers-0.5.1 lib/leftovers/matchers/node_type.rb
leftovers-0.5.0 lib/leftovers/matchers/node_type.rb
leftovers-0.4.3 lib/leftovers/matchers/node_type.rb
leftovers-0.4.2 lib/leftovers/matchers/node_type.rb
leftovers-0.4.1 lib/leftovers/matchers/node_type.rb
leftovers-0.4.0 lib/leftovers/matchers/node_type.rb