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/opvars.rb
lib/core/facets/binding/self.rb
lib/core/facets/kernel/callstack.rb
Parent: Object

Methods

[]   []=   __DIR__   __FILE__   __LINE__   __callee__   __method__   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.

Returns file name.

Returns line number.

Retreive the current running method.

  def tester; p called; end
  tester  #=> :tester

There is a lot of debate on what to call this. method_name differs from called only by the fact that it returns a string, rather then a symbol.

  def tester; p methodname; end
  tester  #=> "tester"

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

Returns the call stack, in array format.

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 = 2
  binding.local_variables  #=> ["a"]

Returns self of the binding context.

[Validate]