Sha256: ebe31736c48b4d55ea6ca4d478b454e27210d965f630331b7c6bce1889e3a07f

Contents?: true

Size: 861 Bytes

Versions: 2

Compression:

Stored size: 861 Bytes

Contents

module PrivatePlease ; module Tracking

  module InstrumentsAllMethodsBelow
    include PrivatePlease::Tracking::Extension

    def self.included(base)

      def base.singleton_method_added(method_name)
        return if Utils.private_singleton_method?(self, method_name) \
               || Utils.singleton_method_defined_by_ancestor?(self, method_name)

        candidate = Candidate.for_class_method(klass = self, method_name)
        Instrumentor.add_call_tracking_code_to(candidate)
      end


      def base.method_added(method_name)
        return if Utils.private_instance_method?(self, method_name) \
               || Utils.instance_method_defined_by_ancestor?(self, method_name)

        candidate = Candidate.for_instance_method(klass = self, method_name)
        Instrumentor.add_call_tracking_code_to(candidate)
      end
    end

  end

end end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
private_please-0.0.5 lib/private_please/tracking/instruments_all_methods_below.rb
private_please-0.0.4 lib/private_please/tracking/instruments_all_methods_below.rb