ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
PK ]HJ# eval-i.rinu [ U:RDoc::AnyMethod[iI" eval:ETI"Binding#eval;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"AEvaluates the Ruby expression(s) in string, in the ;TI"Hbinding's context. If the optional filename and ;TI"Dlineno parameters are present, they will be used when ;TI"reporting syntax errors.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"def get_binding(param)
;TI" binding
;TI" end
;TI"b = get_binding("hello")
;TI""b.eval("param") #=> "hello";T:@format0:
@fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"9binding.eval(string [, filename [,lineno]]) -> obj
;T0[ I"(p1, p2 = v2, p3 = v3);T@FI"Binding;TcRDoc::NormalClass00PK ] source_location-i.rinu [ U:RDoc::AnyMethod[iI"source_location:ETI"Binding#source_location;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LReturns the Ruby source filename and line number of the binding object.;T:
@fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"3binding.source_location -> [String, Integer]
;T0[ I"();T@FI"Binding;TcRDoc::NormalClass00PK ]T local_variable_defined%3f-i.rinu [ U:RDoc::AnyMethod[iI"local_variable_defined?:ETI"$Binding#local_variable_defined?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"8Returns +true+ if a local variable +symbol+ exists.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"
def foo
;TI"
a = 1
;TI"4 binding.local_variable_defined?(:a) #=> true
;TI"5 binding.local_variable_defined?(:b) #=> false
;TI" end
;T:@format0o;
; [I" obj
;T0[ I" (p1);T@FI"Binding;TcRDoc::NormalClass00PK ]a=l local_variable_get-i.rinu [ U:RDoc::AnyMethod[iI"local_variable_get:ETI"Binding#local_variable_get;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"6Returns the value of the local variable +symbol+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"
def foo
;TI"
a = 1
;TI", binding.local_variable_get(:a) #=> 1
;TI"4 binding.local_variable_get(:b) #=> NameError
;TI" end
;T:@format0o;
; [I" obj
;T0[ I" (p1);T@FI"Binding;TcRDoc::NormalClass00PK ] R R local_variable_set-i.rinu [ U:RDoc::AnyMethod[iI"local_variable_set:ETI"Binding#local_variable_set;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"0Set local variable named +symbol+ as +obj+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"
def foo
;TI"
a = 1
;TI" bind = binding
;TI"H bind.local_variable_set(:a, 2) # set existing local variable `a'
;TI"F bind.local_variable_set(:b, 3) # create new local variable `b'
;TI"C # `b' exists only in binding
;TI"
;TI", p bind.local_variable_get(:a) #=> 2
;TI", p bind.local_variable_get(:b) #=> 3
;TI", p a #=> 2
;TI"4 p b #=> NameError
;TI" end
;T:@format0o;
; [I"9This method behaves similarly to the following code:;T@o;; [I"(binding.eval("#{symbol} = #{obj}")
;T;
0o;
; [I")if +obj+ can be dumped in Ruby code.;T:
@fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"4binding.local_variable_set(symbol, obj) -> obj
;T0[ I"
(p1, p2);T@&FI"Binding;TcRDoc::NormalClass00PK ]
local_variables-i.rinu [ U:RDoc::AnyMethod[iI"local_variables:ETI"Binding#local_variables;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns the names of the binding's local variables as symbols.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"
def foo
;TI"
a = 1
;TI" 2.times do |n|
;TI". binding.local_variables #=> [:a, :n]
;TI" end
;TI" end
;T:@format0o;
; [I" Array
;T0[ I"();T@FI"Binding;TcRDoc::NormalClass00PK ], , cdesc-Binding.rinu [ 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 self, and ;TI"Epossibly an iterator block that can be accessed in this context ;TI"