module BindingDumper
Module with patches for Binding class
@example
dump = binding.dump # => 'string representation of binding' Binding.load(dump) # => #<Binding>
Class for buliding patch that adds method ‘_local_binding’
to existing object
@example
data = { file: '/path/to/file.rb', line: 17, method: 'do_something', lvars: { a: 'b' } } patch = BindingDumper::CoreExt::MagicContextPatchBuilder.new(data).patch context = Object.new.extend(patch) context._local_binding # => #<Binding> context._local_binding.eval('a') # => 'b' context._local_binding.eval('__FILE__') # => '/path/to/file.rb' context._local_binding.eval('__LINE__') # => 17 context._local_binding.eval('__method__') # => 'do_something'
Constants
- VERSION