Class: Object

Inherits:
BasicObject
Defined in:
lib/sr/core_patches.rb

Instance Method Summary collapse

Instance Method Details

#__binding__Binding

Used extensively by ‘sr` – this method is essentially what allows interactive code to reach into the state of objects at runtime.

Returns:

  • (Binding)

    a clean ‘Binding` instance representing the current binding of this object



31
32
33
# File 'lib/sr/core_patches.rb', line 31

def __binding__
  is_a?(Module) ? class_eval('binding') : binding
end