module TurboTest::ConstantTracer::Klass::InstanceMethods

Attributes

turbo_test_name[RW]
turbo_test_path[RW]

Public Class Methods

new(object) click to toggle source
Calls superclass method
# File lib/turbo_test_constant_tracer/klass.rb, line 46
def initialize(object)
  super
  check_object_type!(object)
end

Public Instance Methods

__getobj__() click to toggle source
Calls superclass method
# File lib/turbo_test_constant_tracer/klass.rb, line 51
def __getobj__
  result = super
  TurboTest::ConstantTracer::EventPublisher.publish(
    turbo_test_name, turbo_test_path
  )
  result
end
__turbo_test_proxy_object()
turbo_test_proxied_class() click to toggle source
# File lib/turbo_test_constant_tracer/klass.rb, line 59
def turbo_test_proxied_class
  __getobj__
end
Also aliased as: __turbo_test_proxy_object

Private Instance Methods

check_object_type!(object) click to toggle source
# File lib/turbo_test_constant_tracer/klass.rb, line 66
def check_object_type!(object)
  return if object.class == self.class.turbo_test_proxied_class

  msg = "Object class is not #{self.class.turbo_test_proxied_class}"
  raise(TypeError, msg)
end