Sha256: 4e127316dff336b8af28033db448951b25d1c91e1a6e741e366177c33e98ff71

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

require_relative 'code_context'

module Reek
  module Context
    #
    # A context wrapper for method calls found in a syntax tree.
    #
    class SendContext < CodeContext
      attr_reader :name

      def initialize(exp, name)
        @name = name
        super(exp)
      end

      def method_name_called_to_call
        return unless @name == :method

        local_nodes(:sym).map(&:name)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reek-6.4.0 lib/reek/context/send_context.rb
reek-6.3.0 lib/reek/context/send_context.rb
reek-6.2.0 lib/reek/context/send_context.rb