HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/ri/2.7.0/system/Binding/cdesc-Binding.ri
U:RDoc::NormalClass[iI"Binding:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[:
@fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;	I"prelude.rb;T;
0o;;[o:RDoc::Markup::Paragraph;[I"HObjects of class Binding encapsulate the execution context at some ;TI"Eparticular place in the code and retain this context for future ;TI"Buse. The variables, methods, value of <code>self</code>, and ;TI"Epossibly an iterator block that can be accessed in this context ;TI"<are all retained. Binding objects can be created using ;TI"?Kernel#binding, and are made available to the callback of ;TI"7Kernel#set_trace_func and instances of TracePoint.;To:RDoc::Markup::BlankLineo;;[I"GThese binding objects can be passed as the second argument of the ;TI"=Kernel#eval method, establishing an environment for the ;TI"evaluation.;T@o:RDoc::Markup::Verbatim;[I"class Demo
;TI"  def initialize(n)
;TI"    @secret = n
;TI"  end
;TI"  def get_binding
;TI"    binding
;TI"  end
;TI"	end
;TI"
;TI"k1 = Demo.new(99)
;TI"b1 = k1.get_binding
;TI"k2 = Demo.new(-3)
;TI"b2 = k2.get_binding
;TI"
;TI""eval("@secret", b1)   #=> 99
;TI""eval("@secret", b2)   #=> -3
;TI"#eval("@secret")       #=> nil
;T:@format0o;;[I"4Binding objects have no class-specific methods.;T;	I"proc.c;T;
0;	0;
0[[[[[I"
class;T[[:public[[:protected[[:private[[I"
instance;T[[;[
[I"	eval;TI"../ruby-2.7.7/proc.c;T[I"irb;TI"../ruby-2.7.7/lib/irb.rb;T[I"local_variable_defined?;T@M[I"local_variable_get;T@M[I"local_variable_set;T@M[I"local_variables;T@M[I"
receiver;T@M[I"source_location;T@M[;[[;[[[U:RDoc::Context::Section[i0o;;[;	0;
0[I"lib/irb.rb;TI"prelude.rb;TI"proc.c;T@8cRDoc::TopLevel