Class: Surrogate::SurrogateInstanceReflector
- Inherits:
-
Struct
- Object
- Struct
- Surrogate::SurrogateInstanceReflector
- Defined in:
- lib/surrogate/surrogate_instance_reflector.rb
Overview
Utilities for reflecting on surrogate instances
Primarily it exists to avoid having to pollute the surrogate with reflection methods
Instance Attribute Summary collapse
-
#surrogate ⇒ Object
Returns the value of attribute surrogate.
Instance Method Summary collapse
Instance Attribute Details
#surrogate ⇒ Object
Returns the value of attribute surrogate
6 7 8 |
# File 'lib/surrogate/surrogate_instance_reflector.rb', line 6 def surrogate @surrogate end |
Instance Method Details
#hatchling ⇒ Object
11 12 13 |
# File 'lib/surrogate/surrogate_instance_reflector.rb', line 11 def hatchling @hatchling ||= surrogate.instance_variable_get :@hatchling end |
#invocations(method_name) ⇒ Object
7 8 9 |
# File 'lib/surrogate/surrogate_instance_reflector.rb', line 7 def invocations(method_name) hatchling.invocations(method_name) end |