Class: ConvenientService::Common::Plugins::HasInstanceProxy::Entities::InstanceProxy Private

Inherits:
BasicObject
Defined in:
lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

#initialize(target:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • target (Object)

    Can be any type.

Since:

  • 1.0.0



20
21
22
# File 'lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb', line 20

def initialize(target:)
  @__convenient_service_instance_proxy_target__ = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missingObject (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



82
83
84
# File 'lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb', line 82

def method_missing(...)
  ::ConvenientService.reraise { instance_proxy_target.public_send(...) }
end

Instance Method Details

#==(other) ⇒ Boolean?

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



51
52
53
54
55
56
57
# File 'lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb', line 51

def ==(other)
  return unless ::Kernel.instance_method(:instance_of?).bind_call(other, instance_proxy_class)

  return false if instance_proxy_target != other.instance_proxy_target

  true
end

#instance_proxy_classClass

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Class)

Since:

  • 1.0.0



41
42
43
# File 'lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb', line 41

def instance_proxy_class
  ::Kernel.instance_method(:class).bind_call(self)
end

#instance_proxy_targetObject

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



29
30
31
# File 'lib/convenient_service/common/plugins/has_instance_proxy/entities/instance_proxy.rb', line 29

def instance_proxy_target
  @__convenient_service_instance_proxy_target__
end