Class Binding
In: lib/core/facets/binding/caller.rb
lib/core/facets/binding/defined.rb
lib/core/facets/binding/eval.rb
lib/core/facets/binding/local_variables.rb
lib/core/facets/binding/op.rb
lib/core/facets/binding/self.rb
lib/core/facets/kernel/call_stack.rb
Parent: Object

Methods

[]   []=   __DIR__   __FILE__   __LINE__   __callee__   __method__   call_stack   caller   callstack   defined?   eval   local_variables   self  

Public Instance methods

Returns the value of some variable.

  a = 2
  binding["a"]  #=> 2

Set the value of a local variable.

  binding["a"] = 4
  a  #=> 4

Return the directory of the file in which the binding was created.

Returns file name in which the binding was created.

Return the line number on which the binding was created.

Retreive the current running method.

Retreive the current running method.

Returns the call stack, in array format.

Returns the call stack, same format as Kernel#caller()

callstack(level=1)

Alias for call_stack

Returns the nature of something within the context of the binding. Returns nil if that thing is not defined.

Evaluate a Ruby source code string (or block) in the binding context.

Returns the local variables defined in the binding context:

  a = 1
  b = 2

  binding.local_variables  #=> [:a, :b]

Returns self of the binding context.

[Validate]