Sha256: 0210fe2317b7be4f90aec8b3380d4a0a1a16d8afee372c095641f513d53d2247

Contents?: true

Size: 527 Bytes

Versions: 34

Compression:

Stored size: 527 Bytes

Contents

require 'reek/name'
require 'reek/method_context'
require 'reek/sexp_formatter'

module Reek
  class SingletonMethodContext < MethodContext

    def initialize(outer, exp)
      super(outer, exp, false)
      @name = Name.new(exp[2])
      @receiver = SexpFormatter.format(exp[1])
      record_depends_on_self
    end

    def envious_receivers
      []
    end
    
    def outer_name
      "#{@outer.outer_name}#{@receiver}.#{@name}/"
    end

    def to_s
      "#{@outer.outer_name}#{@receiver}.#{@name}"
    end
  end
end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
kevinrutherford-reek-0.3.1.4 lib/reek/singleton_method_context.rb
kevinrutherford-reek-0.3.1.5 lib/reek/singleton_method_context.rb
kevinrutherford-reek-0.3.1.6 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.0.0 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.0.1 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.1 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.2.1 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.2 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.1 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.10 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.11 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.12 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.13 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.14 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.15 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.16 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.2 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.3 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.4 lib/reek/singleton_method_context.rb
kevinrutherford-reek-1.1.3.5 lib/reek/singleton_method_context.rb