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

[]( x )

Returns the value of some variable.

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

[]=( l, v )

Set the value of a local variable.

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

__DIR__()

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

__FILE__()

Returns file name in which the binding was created.

__LINE__()

Return the line number on which the binding was created.

__callee__()

Retreive the current running method.

__method__()

Retreive the current running method.

call_stack(level=1)

Returns the call stack, in array format.

caller( skip=0 )

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

callstack(level=1)

Alias for call_stack

defined?(x)

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

eval(str)

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

local_variables()

Returns the local variables defined in the binding context:

      a = 1
      b = 2

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

self()

Returns self of the binding context.

[Validate]