ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- location%3d-i.ri000064400000001472152345531670007451 0ustar00U:RDoc::AnyMethod[iI"location=:ETI"ERB#location=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JSets optional filename and line number that will be used in ERB code ;TI"Eevaluation and error reporting. See also #filename= and #lineno=;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"$erb = ERB.new('<%= some_x %>') ;TI"erb.render ;TI"3# undefined local variable or method `some_x' ;TI"# from (erb):1 ;TI" ;TI"$erb.location = ['file.erb', 3] ;TI"=# All subsequent error reporting would use new location ;TI"erb.render ;TI"3# undefined local variable or method `some_x' ;TI"# from file.erb:4;T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"((filename, lineno));T@FI"ERB;TcRDoc::NormalClass00cdesc-ERB.ri000064400000001660152345531670006605 0ustar00U:RDoc::NormalClass[iI"ERB:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I"lib/erb/version.rb;T; 0; 0; 0[ [ I" encoding;TI"R;T: privateFI"lib/erb.rb;T[ I" filename;TI"RW;T; F@[ I" lineno;T@; F@[ I"src;T@; F@[U:RDoc::Constant[iI"NOT_GIVEN;TI"ERB::NOT_GIVEN;T; 0o;;[; @ ; 0@ @cRDoc::NormalClass0U; [iI" VERSION;TI"ERB::VERSION;T; 0o;;[; @; 0@@@$0[[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" version;T@[I" instance;T[[; [[;[[; [[I"def_class;T@[I"def_method;T@[I"def_module;T@[I"location=;T@[I"make_compiler;T@[I"new_toplevel;T@[I" result;T@[I"result_with_hash;T@[I"run;T@[I"set_eoutvar;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/erb.rb;TI"lib/erb/version.rb;T@cRDoc::TopLeveldef_class-i.ri000064400000001507152345531670007267 0ustar00U:RDoc::AnyMethod[iI"def_class:ETI"ERB#def_class;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"SDefine unnamed class which has _methodname_ as instance method, and return it.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [I"class MyClass_ ;TI"" def initialize(arg1, arg2) ;TI"% @arg1 = arg1; @arg2 = arg2 ;TI" end ;TI" end ;TI"Mfilename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"erb.filename = filename ;TI"3MyClass = erb.def_class(MyClass_, 'render()') ;TI"+print MyClass.new('foo', 123).render();T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"-(superklass=Object, methodname='result');T@FI"ERB;TcRDoc::NormalClass00DefMethod/cdesc-DefMethod.ri000064400000002166152345531670011675 0ustar00U:RDoc::NormalModule[iI"DefMethod:ETI"ERB::DefMethod;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I">Utility module to define eRuby script as instance method.;To:RDoc::Markup::BlankLineS:RDoc::Markup::Heading: leveli: textI" Example;T@o; ;[I"example.rhtml:;To:RDoc::Markup::Verbatim;[I"<% for item in @items %> ;TI"<%= item %> ;TI"<% end %> ;T: @format0o; ;[I"example.rb:;To;;[I"require 'erb' ;TI"class MyClass ;TI" extend ERB::DefMethod ;TI"3 def_erb_method('render()', 'example.rhtml') ;TI" def initialize(items) ;TI" @items = items ;TI" end ;TI" end ;TI",print MyClass.new([10,20,30]).render() ;T;0o; ;[I" result:;T@o;;[ I"10 ;TI" ;TI"20 ;TI" ;TI"30;T;0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I"def_erb_method;TI"lib/erb.rb;T[I" instance;T[[;[[;[[;[[@B@C[[U:RDoc::Context::Section[i0o;;[;0;0[I"lib/erb.rb;TI"ERB;TcRDoc::NormalClassDefMethod/def_erb_method-i.ri000064400000000631152345531670012126 0ustar00U:RDoc::AnyMethod[iI"def_erb_method:ETI""ERB::DefMethod#def_erb_method;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Idefine _methodname_ as instance method of current module, using ERB ;TI"object or eRuby file;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname, erb_or_fname);T@FI"DefMethod;TcRDoc::NormalModule00DefMethod/def_erb_method-c.ri000064400000000632152345531670012121 0ustar00U:RDoc::AnyMethod[iI"def_erb_method:ETI"#ERB::DefMethod::def_erb_method;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Idefine _methodname_ as instance method of current module, using ERB ;TI"object or eRuby file;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname, erb_or_fname);T@FI"DefMethod;TcRDoc::NormalModule00encoding-i.ri000064400000000414152345531670007126 0ustar00U:RDoc::Attr[iI" encoding:ETI"ERB#encoding;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"The encoding to eval;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0new-c.ri000064400000005227152345531670006132 0ustar00U:RDoc::AnyMethod[iI"new:ETI" ERB::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FConstructs a new ERB object with the template specified in _str_.;To:RDoc::Markup::BlankLineo; ; [I"KAn ERB object works by building a chunk of Ruby code that will output ;TI"%the completed template when run.;T@o; ; [I"OIf _trim_mode_ is passed a String containing one or more of the following ;TI">modifiers, ERB will adjust its code generation as listed:;T@o:RDoc::Markup::Verbatim; [ I"@% enables Ruby code processing for lines beginning with % ;TI"A<> omit newline for lines starting with <% and ending in %> ;TI",> omit newline for lines ending in %> ;TI"'- omit blank lines ending in -%> ;T: @format0o; ; [ I"M_eoutvar_ can be used to set the name of the variable ERB will build up ;TI"Fits output in. This is useful when you need to run multiple ERB ;TI"Ntemplates through the same binding and/or when you want to control where ;TI"Ooutput ends up. Pass the name of the variable to be used inside a String.;T@S:RDoc::Markup::Heading: leveli: textI" Example;T@o; ; ['I"require "erb" ;TI" ;TI"# build data class ;TI"class Listings ;TI"3 PRODUCT = { :name => "Chicken Fried Steak", ;TI"J :desc => "A well messages pattie, breaded and fried.", ;TI"# :cost => 9.95 } ;TI" ;TI"$ attr_reader :product, :price ;TI" ;TI"2 def initialize( product = "", price = "" ) ;TI" @product = product ;TI" @price = price ;TI" end ;TI" ;TI" def build ;TI" b = binding ;TI"C # create and run templates, filling member data variables ;TI"a ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@product").result b ;TI"! <%= PRODUCT[:name] %> ;TI"! <%= PRODUCT[:desc] %> ;TI" END_PRODUCT ;TI"] ERB.new(<<-'END_PRICE'.gsub(/^\s+/, ""), trim_mode: "", eoutvar: "@price").result b ;TI": <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %> ;TI"! <%= PRODUCT[:desc] %> ;TI" END_PRICE ;TI" end ;TI" end ;TI" ;TI"# setup template data ;TI"listings = Listings.new ;TI"listings.build ;TI" ;TI"3puts listings.product + "\n" + listings.price ;T; 0o; ; [I"_Generates_;T@o; ; [ I"Chicken Fried Steak ;TI"0A well messages pattie, breaded and fried. ;TI" ;TI"!Chicken Fried Steak -- 9.95 ;TI"/A well messages pattie, breaded and fried.;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"z(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout');T@SFI"ERB;TcRDoc::NormalClass00make_compiler-i.ri000064400000000531152345531670010147 0ustar00U:RDoc::AnyMethod[iI"make_compiler:ETI"ERB#make_compiler;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GCreates a new compiler for ERB. See ERB::Compiler.new for details;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(trim_mode);T@FI"ERB;TcRDoc::NormalClass00Util/u-i.ri000064400000000374152345531670006526 0ustar00U:RDoc::AnyMethod[iI"u:ETI"ERB::Util#u;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"url_encode;TUtil/url_encode-i.ri000064400000001230152345531670010371 0ustar00U:RDoc::AnyMethod[iI"url_encode:ETI"ERB::Util#url_encode;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";A utility method for encoding the String _s_ as a URL.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI"Lputs url_encode("Programming Ruby: The Pragmatic Programmer's Guide") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"HProgramming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"u;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00Util/url_encode-c.ri000064400000001231152345531670010364 0ustar00U:RDoc::AnyMethod[iI"url_encode:ETI"ERB::Util::url_encode;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I";A utility method for encoding the String _s_ as a URL.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI"Lputs url_encode("Programming Ruby: The Pragmatic Programmer's Guide") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"HProgramming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"u;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00Util/h-i.ri000064400000000375152345531670006512 0ustar00U:RDoc::AnyMethod[iI"h:ETI"ERB::Util#h;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"html_escape;TUtil/html_escape-i.ri000064400000001126152345531670010542 0ustar00U:RDoc::AnyMethod[iI"html_escape:ETI"ERB::Util#html_escape;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">A utility method for escaping HTML tag characters in _s_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI",puts html_escape("is a > 0 & a < 10?") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"!is a > 0 & a < 10?;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"h;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00Util/h-c.ri000064400000000376152345531670006505 0ustar00U:RDoc::AnyMethod[iI"h:ETI"ERB::Util::h;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"html_escape;TUtil/html_escape-c.ri000064400000001127152345531670010535 0ustar00U:RDoc::AnyMethod[iI"html_escape:ETI"ERB::Util::html_escape;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I">A utility method for escaping HTML tag characters in _s_.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"require "erb" ;TI"include ERB::Util ;TI" ;TI",puts html_escape("is a > 0 & a < 10?") ;T: @format0o; ; [I"_Generates_;T@o; ; [I"!is a > 0 & a < 10?;T; 0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[[I"h;To;; [;@;0I"(s);T@FI" Util;TcRDoc::NormalModule00Util/cdesc-Util.ri000064400000001116152345531670010023 0ustar00U:RDoc::NormalModule[iI" Util:ETI"ERB::Util;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"NA utility module for conversion routines, often handy in HTML generation.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[ [I"h;TI"lib/erb.rb;T[I"html_escape;T@ [I"u;T@ [I"url_encode;T@ [I" instance;T[[; [[; [[;[ [@@ [@"@ [@$@ [@&@ [[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/erb.rb;TI"ERB;TcRDoc::NormalClassUtil/u-c.ri000064400000000375152345531670006521 0ustar00U:RDoc::AnyMethod[iI"u:ETI"ERB::Util::u;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@ FI" Util;TcRDoc::NormalModule0[I"ERB::Util;TFI"url_encode;Trun-i.ri000064400000000471152345531670006147 0ustar00U:RDoc::AnyMethod[iI"run:ETI" ERB#run;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Generate results and print them. (see ERB#result);T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b=new_toplevel);T@FI"ERB;TcRDoc::NormalClass00new_toplevel-i.ri000064400000000574152345531670010052 0ustar00U:RDoc::AnyMethod[iI"new_toplevel:ETI"ERB#new_toplevel;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NReturns a new binding each time *near* TOPLEVEL_BINDING for runs that do ;TI"not specify a binding.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(vars = nil);T@FI"ERB;TcRDoc::NormalClass00filename-i.ri000064400000000517152345531670007124 0ustar00U:RDoc::Attr[iI" filename:ETI"ERB#filename;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"NThe optional _filename_ argument passed to Kernel#eval when the ERB code ;TI" is run;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0src-i.ri000064400000000414152345531670006127 0ustar00U:RDoc::Attr[iI"src:ETI" ERB#src;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"#The Ruby code generated by ERB;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0def_module-i.ri000064400000001320152345531670007440 0ustar00U:RDoc::AnyMethod[iI"def_module:ETI"ERB#def_module;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"XCreate unnamed module, define _methodname_ as instance method of it, and return it.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [ I"Pfilename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"erb.filename = filename ;TI"5MyModule = erb.def_module('render(arg1, arg2)') ;TI"class MyClass ;TI" include MyModule ;TI"end;T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(methodname='erb');T@FI"ERB;TcRDoc::NormalClass00result-i.ri000064400000001123152345531670006654 0ustar00U:RDoc::AnyMethod[iI" result:ETI"ERB#result;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PExecutes the generated ERB code to produce a completed template, returning ;TI"Nthe results of that code. (See ERB::new for details on how this process ;TI"&can be affected by _safe_level_.);To:RDoc::Markup::BlankLineo; ; [I"F_b_ accepts a Binding object which is used to set the context of ;TI"code evaluation.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"(b=new_toplevel);T@FI"ERB;TcRDoc::NormalClass00set_eoutvar-i.ri000064400000000757152345531670007712 0ustar00U:RDoc::AnyMethod[iI"set_eoutvar:ETI"ERB#set_eoutvar;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"KCan be used to set _eoutvar_ as described in ERB::new. It's probably ;TI"Jeasier to just use the constructor though, since calling this method ;TI"4requires the setup of an ERB _compiler_ object.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(compiler, eoutvar = '_erbout');T@FI"ERB;TcRDoc::NormalClass00lineno-i.ri000064400000000511152345531670006622 0ustar00U:RDoc::Attr[iI" lineno:ETI"ERB#lineno;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"LThe optional _lineno_ argument passed to Kernel#eval when the ERB code ;TI" is run;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below0F@I"ERB;TcRDoc::NormalClass0def_method-i.ri000064400000001260152345531670007436 0ustar00U:RDoc::AnyMethod[iI"def_method:ETI"ERB#def_method;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ODefine _methodname_ as instance method of _mod_ from compiled Ruby source.;To:RDoc::Markup::BlankLineo; ; [I" example:;To:RDoc::Markup::Verbatim; [ I"Pfilename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml ;TI"(erb = ERB.new(File.read(filename)) ;TI"=erb.def_method(MyClass, 'render(arg1, arg2)', filename) ;TI")print MyClass.new.render('foo', 123);T: @format0: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"%(mod, methodname, fname='(ERB)');T@FI"ERB;TcRDoc::NormalClass00result_with_hash-i.ri000064400000000573152345531670010722 0ustar00U:RDoc::AnyMethod[iI"result_with_hash:ETI"ERB#result_with_hash;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PRender a template on a new toplevel binding with local variables specified ;TI"by a Hash object.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I" (hash);T@FI"ERB;TcRDoc::NormalClass00version-c.ri000064400000000466152345531670007026 0ustar00U:RDoc::AnyMethod[iI" version:ETI"ERB::version;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns revision information for the erb.rb module.;T: @fileI"lib/erb.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"ERB;TcRDoc::NormalClass00