Sha256: 5da02e9efa78d10b1c2fb7c586ff86dcff6556d292f37354fa532df428f670f5

Contents?: true

Size: 531 Bytes

Versions: 10

Compression:

Stored size: 531 Bytes

Contents

# frozen-string-literal: true

module Leftovers
  module DynamicProcessors
    class Call
      # :nocov:
      using ::Leftovers::Backports::SetCaseEq if defined?(::Leftovers::Backports::SetCaseEq)
      # :nocov:

      def initialize(matcher, processor)
        @matcher = matcher
        @processor = processor
      end

      def process(node, file)
        return unless @matcher === node

        call = @processor.process(nil, node, node)
        return unless call

        file.calls << call
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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