Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
4396420cf3
2
Gemfile
2
Gemfile
|
@ -2,6 +2,8 @@ source "http://rubygems.org"
|
|||
gem "sqlite3-ruby", :require => "sqlite3"
|
||||
gem "itextomml", ">=1.4.2"
|
||||
gem "mongrel", ">=1.2.0.pre2"
|
||||
gem "rubyzip"
|
||||
gem "erubis"
|
||||
gem "nokogiri"
|
||||
gem "rake"
|
||||
gem "json"
|
||||
|
|
752
vendor/plugins/erubis/CHANGES.txt
vendored
752
vendor/plugins/erubis/CHANGES.txt
vendored
|
@ -1,752 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# $Release: 2.6.6 $
|
||||
# copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
|
||||
|
||||
- release: 2.6.6
|
||||
date: 2010-06-27
|
||||
bugfixes:
|
||||
|
||||
- |
|
||||
Fixed a bug around InterporationEnhancer and FastEruby to escape back-quote. (thanks to Andrew R Jackson)
|
||||
|
||||
|
||||
- release: 2.6.5
|
||||
date: 2009-07-20
|
||||
bugfixes:
|
||||
|
||||
- |
|
||||
Fixed bug around '-z' option.
|
||||
|
||||
|
||||
- release: 2.6.4
|
||||
date: 2009-02-18
|
||||
enhancemens:
|
||||
|
||||
- |
|
||||
Rails 2.2 and 2.3 support.
|
||||
|
||||
|
||||
|
||||
- release: 2.6.3
|
||||
date: 2009-02-07
|
||||
bugfixes:
|
||||
|
||||
- Enhancer name was not displayed in Ruby 1.9.1 when it was missing.
|
||||
|
||||
- Command option argument name was not displayed correctly as a part of error message.
|
||||
|
||||
- MethoNotFound error was raised when invalid option was specified.
|
||||
|
||||
|
||||
- release: 2.6.2
|
||||
date: 2008-06-12
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Ruby 1.9 support.
|
||||
|
||||
bugfixes:
|
||||
|
||||
- |
|
||||
Fixed installation problem on Windows (Thanks to Tim Morgan and Allen).
|
||||
|
||||
|
||||
- release: 2.6.1
|
||||
date: 2008-06-06
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Rails 2.1 support. (special thanks José Valim)
|
||||
|
||||
|
||||
|
||||
- release: 2.6.0
|
||||
date: 2008-05-05
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Improved support of Ruby on Rails 2.0.2.
|
||||
New class ActionView::TemplateHandlers::Erubis is defined and
|
||||
registered as default handler of *.html.erb and *.rhtml.
|
||||
|
||||
- |
|
||||
'<%% %>' and '<%%= %>' are converted into '<% %>' and '<%= %>' respectively.
|
||||
This is for compatibility with ERB.
|
||||
|
||||
ex1.rhtml:
|
||||
<ul>
|
||||
<%% for item in @list %>
|
||||
<li><%%= item %></li>
|
||||
<%% end %>
|
||||
</ul>
|
||||
|
||||
result:
|
||||
$ erubis ex1.rhtml
|
||||
<ul>
|
||||
<% for item in @list %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
- |
|
||||
'<%= -%>' removes tail spaces and newlines.
|
||||
This is for compatibiliy with ERB when trim mode is '-'.
|
||||
'<%= =%>' also removes tail spaces and newlines, and this is
|
||||
Erubis-original enhancement (cooler than '<%= -%>', isn't it?).
|
||||
|
||||
ex2.rhtml:
|
||||
<div>
|
||||
<%= @var -%> # or <%= @var =%>
|
||||
</div>
|
||||
|
||||
result (version 2.6.0):
|
||||
$ erubis -c '{var: "AAA\n"}' ex2.rhtml
|
||||
<div>
|
||||
AAA
|
||||
</div>
|
||||
|
||||
result (version 2.5.0):
|
||||
$ erubis -c '{var: "AAA\n"}' ex2.rhtml
|
||||
<div>
|
||||
AAA
|
||||
|
||||
</div>
|
||||
|
||||
- |
|
||||
Erubis::Eruby.load_file() now allows you to change cache filename.
|
||||
|
||||
ex.
|
||||
eruby = Erubis::Eruby.load_file("ex3.rhtml",
|
||||
:cachename=>'ex3.rhtml.cache')
|
||||
|
||||
|
||||
- release: 2.5.0
|
||||
date: 2008-01-30
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Ruby on Rails 2.0 support.
|
||||
If you are using preprocessing, notice that _?('foo.id') will be NG
|
||||
because it contains period ('.') character.
|
||||
|
||||
--------------------
|
||||
<!-- NG in Rails 2.0 -->
|
||||
[%= link_to 'Edit', edit_user_path(_?('@user.id')) %]
|
||||
[%= link_to 'Show', @user %]
|
||||
[%= link_to 'Delete', @user, :confirm=>'OK?', :method=>:delete %]
|
||||
|
||||
<!-- OK in Rails 2.0 -->
|
||||
<%= user_id = @user.id %>
|
||||
[%= link_to 'Edit', edit_user_path(_?('user_id')) %]
|
||||
[%= link_to 'Show', :action=>'show', :id=>_?('user_id') %]
|
||||
[%= link_to 'Delete', {:action=>'destroy', :id=>_?('user_id')},
|
||||
{:confirm=>'OK?', :method=>:delete} %]
|
||||
--------------------
|
||||
|
||||
- |
|
||||
(experimental)
|
||||
Rails form helper methods for preprocessing are added.
|
||||
These helper methos are available with preprocessing.
|
||||
|
||||
ex. _form.rhtml
|
||||
--------------------
|
||||
Name: <%= text_field :user, :name %>
|
||||
Name: [%= pp_text_field :user, :name %]
|
||||
--------------------
|
||||
|
||||
preprocessed:
|
||||
--------------------
|
||||
Name: <%= text_field :user, :name %>
|
||||
Name: <input id="stock_name" name="stock[name]" size="30" type="text" value="<%=h @stock.name%>" />
|
||||
--------------------
|
||||
|
||||
Ruby code:
|
||||
--------------------
|
||||
_buf << '
|
||||
Name: '; _buf << ( text_field :stock, :name ).to_s; _buf << '
|
||||
Name: <input id="stock_name" name="stock[name]" size="30" type="text" value="'; _buf << (h @stock.name).to_s; _buf << '" />
|
||||
';
|
||||
--------------------
|
||||
|
||||
This shows that text_filed() is called every time when rendering,
|
||||
but pp_text_filed() is called only once when loading template,
|
||||
so pp_text_field() with prepocessing is much faster than text_field().
|
||||
|
||||
See User's guide for details.
|
||||
http://www.kuwata-lab.com/erubis/users-guide.05.html#rails-formhelpers
|
||||
|
||||
#
|
||||
- release: 2.4.1
|
||||
date: 2007-09-25
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Add new section 'evaluate(context) v.s. result(binding)' to user's guide.
|
||||
This section describes why Erubis::Eruby#evaluate(context) is recommended
|
||||
rather than Erubis::Eruby#result(binding).
|
||||
User's Guide > Other Topics > evaluate(context) v.s. result(binding)
|
||||
http://www.kuwata-lab.com/erubis/users-guide.06.html#topics-context-vs-binding
|
||||
|
||||
- |
|
||||
Add new command-line property '--docwrite={true|false}' to
|
||||
Erubis::Ejavascript.
|
||||
If this property is true then 'document.write(_buf.join(""));' is used
|
||||
as postamble and if it is false then '_buf.join("")' is used.
|
||||
Default is true for compatibility reason but it will be false in the
|
||||
future release.
|
||||
(This feature was proposed by D.Dribin. Thank you.)
|
||||
|
||||
bugfix:
|
||||
|
||||
- |
|
||||
When using Erubis::Eruby#evaluate(), changing local variables in
|
||||
templates have affected to variables accessible with TOPLEVEL_BINDING.
|
||||
It means that if you change variables in templates, it is possible to
|
||||
change variables in main program.
|
||||
This was a bug and is now fixed not to affect to variables in main
|
||||
program.
|
||||
|
||||
ex. template.rhtml
|
||||
--------------------
|
||||
<% for x in @items %>
|
||||
item = <%= x %>
|
||||
<% end %>
|
||||
--------------------
|
||||
|
||||
ex. main-program.rb
|
||||
--------------------
|
||||
require 'erubis'
|
||||
x = 10
|
||||
items = ['foo', 'bar', 'baz']
|
||||
eruby = Erubis::Eruby.new(File.read('template.rhtml'))
|
||||
s = eruby.evaluate(:items=>items)
|
||||
print s
|
||||
$stderr.puts "*** debug: x=#{x.inspect}" #=> x="baz" (2.4.0)
|
||||
#=> x=10 (2.4.1)
|
||||
--------------------
|
||||
|
||||
- |
|
||||
PercentLineEnhancer was very slow. Now performance problem is solved.
|
||||
|
||||
|
||||
#
|
||||
- release: 2.4.0
|
||||
date: 2007-07-19
|
||||
enhancements:
|
||||
|
||||
- |
|
||||
Preprocessing is supported by Ruby on Rails helper.
|
||||
Preprocessing makes Ruby on Rails application about 20-40 percent faster.
|
||||
|
||||
For example,
|
||||
|
||||
[%= link_to 'Show', :action=>'show', :id=>_?('@user.id') %]
|
||||
|
||||
is evaluate by preprocessor and expanded into the following
|
||||
when template file is loaded.
|
||||
|
||||
<a href="/users/show/<%=@user.id%>">Show</a>
|
||||
|
||||
It means that link_to() is not called when template is rendered
|
||||
and rendering speed will be much faster in the result.
|
||||
|
||||
See User's Guide for details.
|
||||
|
||||
- |
|
||||
Erubis::Eruby#evaluate() (or Erubis::RubyEvaluator#evaluate()) now
|
||||
creates Proc object from @src and eval it.
|
||||
|
||||
def evaluate(context=Context.new)
|
||||
context = Context.new(context) if context.is_a?(Hash)
|
||||
@_proc ||= eval("proc { #{@src} }", TOPLEVEL_BINDING, @filename || '(erubis)')
|
||||
return context.instance_eval(&@_proc)
|
||||
end
|
||||
|
||||
This makes evaluate() much faster when eruby object is reused.
|
||||
|
||||
- |
|
||||
Erubis::Eruby#def_method() is supported.
|
||||
This method defines ruby code as instance method or singleton metod.
|
||||
|
||||
require 'erubis'
|
||||
s = "hello <%= name %>"
|
||||
eruby = Erubis::Eruby.new(s)
|
||||
filename = 'hello.rhtml'
|
||||
|
||||
## define instance method to Dummy class (or module)
|
||||
class Dummy; end
|
||||
eruby.def_method(Dummy, 'render(name)', filename) # filename is optional
|
||||
p Dummy.new.render('world') #=> "hello world"
|
||||
|
||||
## define singleton method to an object
|
||||
obj = Object.new
|
||||
eruby.def_method(obj, 'render(name)', filename) # filename is optional
|
||||
p obj.render('world') #=> "hello world"
|
||||
|
||||
This is equivarent to ERB#def_method().
|
||||
|
||||
- |
|
||||
Erubis::XmlHelper.url_escape() and u() which is alias of url_escape()
|
||||
are added.
|
||||
This is equivarent to ERB#Util.url_escape().
|
||||
|
||||
|
||||
bugfix:
|
||||
- Help message was not shown when '-h' is specified. Fixed.
|
||||
- 'def method()' was not availabe in template file. Fixed.
|
||||
|
||||
|
||||
#
|
||||
- release: 2.3.1
|
||||
date: 2007-05-26
|
||||
bugfix:
|
||||
- A serious bug in 'helpers/rails_helper.rb' is fixed.
|
||||
You must be update if you are using Erubis with Ruby on Rails.
|
||||
|
||||
|
||||
#
|
||||
- release: 2.3.0
|
||||
date: 2007-05-23
|
||||
enhancements:
|
||||
- |
|
||||
New class 'Erubis::FastEruby' is added.
|
||||
It is a subclass of Erubis::Eruby and includes InterpolationEnhancer.
|
||||
Erubis::FastEruby is compatible with and faster than Erubis::Eruby.
|
||||
|
||||
- |
|
||||
New enhancer 'InterpolationEnhancer' is added.
|
||||
This enhancer uses expression interpolation to eliminate method call
|
||||
of String#<<. In the result, this enhancer makes Eruby a little faster.
|
||||
|
||||
--------------------
|
||||
## Assume that input is '<a href="<%=url%>"><%=name%></a>'.
|
||||
## Eruby convert input into the following code. String#<< is called 5 times.
|
||||
_buf << '<a href="'; _buf << (url).to_s; _buf << '">'; _buf << (name).to_s; _buf << '</a>';
|
||||
|
||||
## When InterpolationEnhancer is used, String#<< is called only once.
|
||||
_buf << %Q`<a href="#{url}">#{name}</a>`;
|
||||
--------------------
|
||||
|
||||
- |
|
||||
New enhancer 'ErboutEnhancer' is added.
|
||||
ErboutEnhancer set '_erbout' as well as '_buf' to be compatible with ERB.
|
||||
|
||||
ex.
|
||||
====================
|
||||
$ cat ex.rhtml
|
||||
<p>Hello</p>
|
||||
$ erubis -x ex.rhtml
|
||||
_buf = ''; _buf << '<p>Hello</p>
|
||||
';
|
||||
_buf.to_s
|
||||
$ erubis -xE Erbout ex.rhtml
|
||||
_erbout = _buf = ''; _buf << '<p>Hello</p>
|
||||
';
|
||||
_buf.to_s
|
||||
====================
|
||||
|
||||
- |
|
||||
[experimental]
|
||||
New enhancer 'DeleteIndentEnhancer' is added.
|
||||
This enhancer deletes indentation of HTML file.
|
||||
|
||||
ex.
|
||||
====================
|
||||
$ cat ex.rhtml
|
||||
<div>
|
||||
<ul>
|
||||
<% for item in ['AAA', 'BBB', 'CCC'] %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
$ erubis ex.rhtml
|
||||
<div>
|
||||
<ul>
|
||||
<li>AAA</li>
|
||||
<li>BBB</li>
|
||||
<li>CCC</li>
|
||||
</ul>
|
||||
</div>
|
||||
$ erubis -E DeleteIndent ex.rhtml
|
||||
<div>
|
||||
<ul>
|
||||
<li>AAA</li>
|
||||
<li>BBB</li>
|
||||
<li>CCC</li>
|
||||
</ul>
|
||||
</div>
|
||||
====================
|
||||
|
||||
- |
|
||||
Mod_ruby is supported (very thanks to Andrew R Jackson!).
|
||||
See users-guide and 'contrib/erubis-run.rb' for details.
|
||||
|
||||
- |
|
||||
New command-line option '-X', '-N', '-U', and '-C' are added.
|
||||
These are intended to be a replacement of 'notext' command.
|
||||
'-X' shows only ruby statements and expressions.
|
||||
'-N' adds line numbers.
|
||||
'-U' compress empty lines into a line.
|
||||
'-C' removes empty lines.
|
||||
|
||||
|
||||
changes:
|
||||
|
||||
- |
|
||||
'helpers/rails_helper.rb' is changed to use ErboutEnhancer.
|
||||
The following is an examle to use Erubis with Ruby on Rails.
|
||||
|
||||
File 'config/environment.rb':
|
||||
----------------------------------------
|
||||
require 'erubis/helpers/rails_helper'
|
||||
#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby
|
||||
#Erubis::Helpers::RailsHelper.init_properties = {}
|
||||
#Erubis::Helpers::RailsHelper.show_src = false # set true for debugging
|
||||
----------------------------------------
|
||||
|
||||
- |
|
||||
Command 'notext' has been removed. Use '-X', '-N', '-U', and '-C'
|
||||
instead.
|
||||
|
||||
- |
|
||||
Tab characters in YAML file are expaneded automatically.
|
||||
If you want not to expand tab characters, add command-line optio '-T'.
|
||||
|
||||
- |
|
||||
Benchmark scripts (benchmark/bench.*) are rewrited.
|
||||
|
||||
- |
|
||||
Users-guide (doc/users-guide.html) is updated.
|
||||
|
||||
|
||||
|
||||
#
|
||||
- release: 2.2.0
|
||||
date: 2007-02-11
|
||||
enhancements:
|
||||
- |
|
||||
Performance tuned up. Release 2.2.0 works about 8 percent faster
|
||||
than 2.1.0.
|
||||
As a result, Erubis works more than 10 percent faster than eruby.
|
||||
(eruby is the extension module of eRuby written in C.)
|
||||
|
||||
- |
|
||||
Support of Ruby on Rails improved.
|
||||
If you want to use Erubis with Ruby on Rails, add the following code
|
||||
into your 'config/environment.rb' and restart web server.
|
||||
This will set Erubis as eRuby compiler in Ruby on Rails instead of ERB.
|
||||
|
||||
--------------------
|
||||
require 'erubis/helpers/rails_helper'
|
||||
#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby
|
||||
#Erubis::Helpers::RailsHelper.init_properties = {}
|
||||
#Erubis::Helpers::RailsHelper.show_src = true
|
||||
--------------------
|
||||
|
||||
Methods 'capture()' and 'content_for()' of ActionView::Helpers::CaptureHelper
|
||||
are available. Methd ActionView::Helpers::TextHelper#concat() is also available.
|
||||
|
||||
If Erubis::Helpers::RailsHelper.show_src is ture, Erubis prints converted
|
||||
Ruby code into log file (such as 'log/development.log').
|
||||
|
||||
- |
|
||||
Erubis::Engine.load_file(filename) creates cache file (filename +
|
||||
'.cache') automatically if cache file is old or not exist.
|
||||
Caching makes Erubis about 40-50 percent faster.
|
||||
|
||||
ex.
|
||||
--------------------
|
||||
require 'erubis'
|
||||
eruby = Erubis::Eruby.load_file('example.rhtml')
|
||||
## cache file 'example.rhtml.cache' is created automatically
|
||||
--------------------
|
||||
|
||||
- |
|
||||
Command-line option '-f datafile' can take Ruby script ('*.rb')
|
||||
as well as YAML file ('*.yaml' or '*.yml').
|
||||
|
||||
ex.
|
||||
====================
|
||||
$ cat context.rb
|
||||
@title = 'Example'
|
||||
@list = %w[AAA BBB CCC]
|
||||
$ cat example.rhtml
|
||||
<h1><%= @title %></h1>
|
||||
<ul>
|
||||
<% for item in @list %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
$ erubis -f context.rb example.rhtml
|
||||
<h1>Example</h1>
|
||||
<ul>
|
||||
<li>AAA</li>
|
||||
<li>BBB</li>
|
||||
<li>CCC</li>
|
||||
</ul>
|
||||
====================
|
||||
|
||||
- |
|
||||
New command-line option '-c context' support. It takes context string
|
||||
in YAML inline style or Ruby code style.
|
||||
|
||||
ex. YAML inline style
|
||||
====================
|
||||
$ erubis -c '{title: Example, list: [AAA, BBB, CCC]}' example.rhtml
|
||||
====================
|
||||
|
||||
ex. Ruby style
|
||||
====================
|
||||
$ erubis -c '@title="Example"; @list=%w[AAA BBB CCC]' example.rhtml
|
||||
====================
|
||||
|
||||
- |
|
||||
New command-line option '-z' (syntax checking) support. It is similar
|
||||
to 'erubis -x file.rhtml | ruby -wc', but it can take several filenames.
|
||||
|
||||
ex.
|
||||
====================
|
||||
$ erubis -z app/views/*/*.rhtml
|
||||
Syntax OK
|
||||
====================
|
||||
|
||||
- |
|
||||
New constant Erubis::VERSION added.
|
||||
|
||||
|
||||
changes:
|
||||
- |
|
||||
Class Erubis::Eruby changed to include Erubis::StringBufferEnhancer
|
||||
instead of Erubis::ArrayBufferEnhancer.
|
||||
This is for Ruby on Rails support.
|
||||
|
||||
ex.
|
||||
====================
|
||||
$ cat example.rhtml
|
||||
<ul>
|
||||
<% for item in @list %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
$ erubis -x example.rhtml
|
||||
_buf = ''; _buf << '<ul>
|
||||
'; for item in @list
|
||||
_buf << ' <li>'; _buf << ( item ).to_s; _buf << '</li>
|
||||
'; end
|
||||
_buf << '</ul>
|
||||
';
|
||||
_buf.to_s
|
||||
====================
|
||||
|
||||
- |
|
||||
Erubis::StringBufferEnhancer#add_postamble() prints "_buf.to_s"
|
||||
instead of "_buf".
|
||||
This is useful for 'erubis -x file.rhtml | ruby -wc'.
|
||||
|
||||
- |
|
||||
Command-line option '-T' is removed. Use '--trim=false' instead.
|
||||
|
||||
- |
|
||||
License is changed to MIT License.
|
||||
|
||||
- |
|
||||
Embedded pattern '<%- -%>' can be handled.
|
||||
|
||||
|
||||
#
|
||||
- release: 2.1.0
|
||||
date: 2006-09-23
|
||||
enhancements:
|
||||
- |
|
||||
Ruby on Rails support. Add the following code to
|
||||
your 'app/controllers/application.rb' and restart web server.
|
||||
|
||||
--------------------
|
||||
require 'erubis/helper/rails'
|
||||
suffix = 'erubis'
|
||||
ActionView::Base.register_template_handler(suffix, Erubis::Helper::RailsTemplate)
|
||||
#Erubis::Helper::RailsTemplate.engine_class = Erubis::EscapedEruby ## or Erubis::PI::Eruby
|
||||
#Erubis::Helper::RailsTemplate.default_properties = { :escape=>true, :escapefunc=>'h' }
|
||||
--------------------
|
||||
|
||||
And rename your view template as 'xxx.erubis'.
|
||||
If you got the "(eval):10:in `render': no block given" error,
|
||||
use '@content_for_layout' instead 'yield' in your layout template.
|
||||
|
||||
- |
|
||||
Another eRuby engine (PIEngine) support. This engine doesn't
|
||||
break HTML design because it uses Processing Instructions (PI)
|
||||
'<?rb .. ?>' as embedded pattern instead of '<% .. %>'.
|
||||
|
||||
example.rhtml
|
||||
--------------------
|
||||
<table>
|
||||
<?rb @list.each_with_index do |item, i| ?>
|
||||
<?rb klass = i % 2 == 0 ? 'odd' : 'even' ?>
|
||||
<tr class="@{klass}@">
|
||||
<td>@!{item}@</td>
|
||||
</tr>
|
||||
<?rb end ?>
|
||||
</table>
|
||||
--------------------
|
||||
|
||||
compile:
|
||||
====================
|
||||
$ erubis -x --pi example.rhtml
|
||||
_buf = []; _buf << '<table>
|
||||
'; @list.each_with_index do |item, i|
|
||||
klass = i % 2 == 0 ? 'odd' : 'even'
|
||||
_buf << ' <tr class="'; _buf << Erubis::XmlHelper.escape_xml(klass); _buf << '">
|
||||
<td>'; _buf << (item).to_s; _buf << '</td>
|
||||
</tr>
|
||||
'; end
|
||||
_buf << '</table>
|
||||
';
|
||||
_buf.join
|
||||
====================
|
||||
|
||||
- |
|
||||
Add new command 'notext' which remove text part from eRuby
|
||||
script and leaves only Ruby code.
|
||||
This is very useful for debug of eRuby script.
|
||||
|
||||
example2.rhtml
|
||||
--------------------
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<% @list.each_with_index do |item, i| %>
|
||||
<% klass = i % 2 == 0 ? 'odd' : 'even' %>
|
||||
<tr class="<%= klass %>">
|
||||
<td><%== item %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
--------------------
|
||||
|
||||
command line example:
|
||||
====================
|
||||
$ notext example2.rhtml
|
||||
_buf = [];
|
||||
|
||||
|
||||
@list.each_with_index do |item, i| ;
|
||||
klass = i % 2 == 0 ? 'odd' : 'even' ;
|
||||
_buf << ( klass ).to_s;
|
||||
_buf << Erubis::XmlHelper.escape_xml( item );
|
||||
|
||||
end ;
|
||||
|
||||
|
||||
|
||||
_buf.join
|
||||
$ notext -nc example2.rhtml
|
||||
1: _buf = [];
|
||||
4: @list.each_with_index do |item, i| ;
|
||||
5: klass = i % 2 == 0 ? 'odd' : 'even' ;
|
||||
6: _buf << ( klass ).to_s;
|
||||
7: _buf << Erubis::XmlHelper.escape_xml( item );
|
||||
9: end ;
|
||||
13: _buf.join
|
||||
====================
|
||||
|
||||
- |
|
||||
Add new enhance 'NoCode' which removes ruby code from
|
||||
eRuby script and leaves only HTML text part.
|
||||
It is very useful to validate HTML of eRuby script.
|
||||
|
||||
command-line example:
|
||||
====================
|
||||
$ erubis -x -E NoCode example2.rhtml
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
|
||||
|
||||
<tr class="">
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
====================
|
||||
|
||||
changes:
|
||||
- License is changed to LGPL.
|
||||
- Command-line property '--escape=name' is renamed to
|
||||
'--escapefunc=name'.
|
||||
- When command-line option '-l perl' is specified, function
|
||||
'encode_entities()' is used ad escaping function which is
|
||||
available wth HTML::Entities module.
|
||||
|
||||
bugfix:
|
||||
- There is a certain pattern which makes Engine#convert()
|
||||
too slow. Now Engne#convert() is fixed not to be slown.
|
||||
- Command name is now displayed when '-h' is specified.
|
||||
|
||||
|
||||
#
|
||||
- release: 2.0.1
|
||||
date: 2006-06-21
|
||||
bugfix:
|
||||
- some minor bugs are fixed
|
||||
|
||||
|
||||
#
|
||||
- release: 2.0.0
|
||||
date: 2006-05-20
|
||||
changes:
|
||||
- module 'PrintEnhancer' is renamed to 'PrintEnabledEnahncer'
|
||||
- module 'FastEnhancer' and class 'FastEruby' is obsolete because they are integrated into Eruby class
|
||||
- Eruby#evaluate() calls instance_eval() instead of eval()
|
||||
- XmlEruby.escape_xml() is moved to XmlHelper.escape_xml()
|
||||
enhancements:
|
||||
- multi programming language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript)
|
||||
- class Eruby runs very fast because FastEnhancer module is integrated into Eruby by default
|
||||
- TinyEruby class (tiny.rb) is added
|
||||
- module ArrayBufferEnhancer added
|
||||
- module ArrayEnhancer added
|
||||
- module BiPatternEnhancer added
|
||||
- module EscapeEnhancer added
|
||||
- module HeaderFooterEnhancer added
|
||||
- module NoTextEnhancer added
|
||||
- module PercentLineEnhancer added
|
||||
- module PrintEnabledEnhancer added
|
||||
- module PrintOutEnhancer added
|
||||
- module SimplifyEnhancer added
|
||||
- module StringBufferEnhancer added
|
||||
- module StringIOEnhancer added
|
||||
- command-line option '-b' (body only) added
|
||||
- command-line option '-e' (escape) added
|
||||
- command-line option '-l' (lang) added
|
||||
- command-line option '-E' (enhancer) added
|
||||
- command-line option '-I' (require path) added
|
||||
- command-line option '-K' (kanji code) added
|
||||
- command-line option '-S' (string to symbol) added
|
||||
- command-line option '-B' (call result(binding())) added
|
||||
|
||||
|
||||
#
|
||||
- release: 1.1.0
|
||||
date: 2006-03-05
|
||||
enhancements:
|
||||
- '<%# ... %>' is supported
|
||||
- PrintEnhancer, PrintEruby, and PrintXmlEruby added
|
||||
|
||||
- release: 1.0.1
|
||||
date: 2006-02-01
|
||||
bugfixes:
|
||||
- bin/erubis is available with RubyGems
|
||||
|
||||
|
||||
#
|
||||
- release: 1.0.0
|
||||
date: 2006-02-01
|
||||
bugfixes:
|
||||
- first release
|
||||
|
20
vendor/plugins/erubis/MIT-LICENSE
vendored
20
vendor/plugins/erubis/MIT-LICENSE
vendored
|
@ -1,20 +0,0 @@
|
|||
copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
102
vendor/plugins/erubis/README.txt
vendored
102
vendor/plugins/erubis/README.txt
vendored
|
@ -1,102 +0,0 @@
|
|||
= README
|
||||
|
||||
release:: 2.6.6
|
||||
copyright:: copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
|
||||
|
||||
|
||||
== About Erubis
|
||||
|
||||
Erubis is an implementation of eRuby. It has the following features.
|
||||
* Very fast, almost three times faster than ERB and even 10% faster than eruby
|
||||
* Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript)
|
||||
* Auto escaping support
|
||||
* Auto trimming spaces around '<% %>'
|
||||
* Embedded pattern changeable (default '<% %>')
|
||||
* Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>')
|
||||
* Context object available and easy to combine eRuby template with YAML datafile
|
||||
* Print statement available
|
||||
* Easy to extend and customize in subclass
|
||||
* Ruby on Rails support
|
||||
|
||||
Erubis is implemented in pure Ruby. It requires Ruby 1.8 or higher.
|
||||
Erubis now supports Ruby 1.9.
|
||||
|
||||
See doc/users-guide.html for details.
|
||||
|
||||
|
||||
|
||||
== Installation
|
||||
|
||||
* If you have installed RubyGems, just type <tt>gem install erubis</tt>.
|
||||
|
||||
$ sudo gem install erubis
|
||||
|
||||
* Else install abstract[http://rubyforge.org/projects/abstract/] at first,
|
||||
and download erubis_X.X.X.tar.bz2 and install it by setup.rb.
|
||||
|
||||
$ tar xjf abstract_X.X.X.tar.bz2
|
||||
$ cd abstract_X.X.X/
|
||||
$ sudo ruby setup.rb
|
||||
$ cd ..
|
||||
$ tar xjf erubis_X.X.X.tar.bz2
|
||||
$ cd erubis_X.X.X/
|
||||
$ sudo ruby setup.rb
|
||||
|
||||
* (Optional) It is able to merge 'lib/**/*.rb' into 'bin/erubis' by
|
||||
'contrib/inline-require' script.
|
||||
|
||||
$ tar xjf erubis_X.X.X.tar.bz2
|
||||
$ cd erubis_X.X.X/
|
||||
$ cp /tmp/abstract_X.X.X/lib/abstract.rb lib
|
||||
$ unset RUBYLIB
|
||||
$ contrib/inline-require -I lib bin/erubis > contrib/erubis
|
||||
|
||||
|
||||
|
||||
== Ruby on Rails Support
|
||||
|
||||
Erubis supports Ruby on Rails.
|
||||
All you have to do is to add the following code into your 'config/environment.rb'
|
||||
and restart web server.
|
||||
|
||||
require 'erubis/helpers/rails_helper'
|
||||
#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby
|
||||
#Erubis::Helpers::RailsHelper.init_properties = {}
|
||||
#Erubis::Helpers::RailsHelper.show_src = nil
|
||||
|
||||
If Erubis::Helpers::RailsHelper.show_src is ture, Erubis prints converted Ruby code
|
||||
into log file ('log/development.log' or so). It is useful for debug.
|
||||
|
||||
|
||||
|
||||
== Exploring Guide
|
||||
|
||||
If you are exploring Eruby, see the following class at first.
|
||||
* Erubis::TinyEruby (erubis/tiny.rb) --
|
||||
the most simple eRuby implementation.
|
||||
* Erubis::Engine (erubis/engine.rb) --
|
||||
base class of Eruby, Ephp, Ejava, and so on.
|
||||
* Erubis::Eruby (erubis/engine/eruby.rb) --
|
||||
engine class for eRuby.
|
||||
* Erubis::Converter (erubis/converter.rb) --
|
||||
convert eRuby script into Ruby code.
|
||||
|
||||
|
||||
|
||||
== Benchmark
|
||||
|
||||
'benchmark/erubybenchmark.rb' is a benchmark script of Erubis.
|
||||
Try 'ruby erubybenchmark.rb' in benchmark directory.
|
||||
|
||||
|
||||
|
||||
== License
|
||||
|
||||
MIT License
|
||||
|
||||
|
||||
|
||||
== Author
|
||||
|
||||
makoto kuwata <kwa(at)kuwata-lab.com>
|
6
vendor/plugins/erubis/benchmark/Makefile
vendored
6
vendor/plugins/erubis/benchmark/Makefile
vendored
|
@ -1,6 +0,0 @@
|
|||
|
||||
bench:
|
||||
ruby bench.rb -n 10000
|
||||
|
||||
clean:
|
||||
rm -rf bench_*.rhtml*
|
313
vendor/plugins/erubis/benchmark/bench.rb
vendored
313
vendor/plugins/erubis/benchmark/bench.rb
vendored
|
@ -1,313 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
###
|
||||
### $Release: 2.6.6 $
|
||||
### copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
###
|
||||
|
||||
require 'erb'
|
||||
require 'erubis'
|
||||
require 'erubis/tiny'
|
||||
require 'erubis/engine/enhanced'
|
||||
require 'yaml'
|
||||
require 'cgi'
|
||||
include ERB::Util
|
||||
|
||||
begin
|
||||
require 'eruby'
|
||||
rescue LoadError
|
||||
ERuby = nil
|
||||
end
|
||||
|
||||
def File.write(filename, content)
|
||||
File.open(filename, 'w') { |f| f.write(content) }
|
||||
end
|
||||
|
||||
|
||||
## change benchmark library to use $stderr instead of $stdout
|
||||
require 'benchmark'
|
||||
module Benchmark
|
||||
class Report
|
||||
def print(*args)
|
||||
$stderr.print(*args)
|
||||
end
|
||||
end
|
||||
module_function
|
||||
def print(*args)
|
||||
$stderr.print(*args)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class BenchmarkApplication
|
||||
|
||||
TARGETS = %w[eruby
|
||||
ERB ERB(cached)
|
||||
Erubis::Eruby Erubis::Eruby(cached)
|
||||
Erubis::FastEruby Erubis::FastEruby(cached)
|
||||
Erubis::TinyEruby
|
||||
Erubis::ArrayBufferEruby
|
||||
Erubis::PrintOutEruby
|
||||
Erubis::StdoutEruby
|
||||
]
|
||||
|
||||
def initialize(ntimes, context, targets=nil, params={})
|
||||
@ntimes = ntimes
|
||||
@context = context
|
||||
@targets = targets && !targets.empty? ? targets : TARGETS.dup
|
||||
@testmode = params[:testmode] || 'execute'
|
||||
@erubyfile = params[:erubyfile] || 'erubybench.rhtml'
|
||||
@printout = params[:printout] || false
|
||||
end
|
||||
|
||||
attr_accessor :ntimes, :targets
|
||||
attr_accessor :testmode, :erubyfile, :contextfile, :printout
|
||||
|
||||
def context2code(context, varname='context')
|
||||
s = ''
|
||||
context.each { |k, | s << "#{k} = #{varname}[#{k.inspect}]; " }
|
||||
return s
|
||||
end
|
||||
|
||||
def perform_benchmark
|
||||
width = 30
|
||||
$stderr.puts "*** ntimes=#{@ntimes}, testmode=#{@testmode}"
|
||||
Benchmark.bm(width) do |job|
|
||||
for target in @targets do
|
||||
method = "#{@testmode}_#{target.gsub(/::|-|\(/, '_').gsub(/\)/, '').downcase}"
|
||||
#$stderr.puts "*** debug: method=#{method.inspect}"
|
||||
next unless self.respond_to?(method)
|
||||
filename = "bench_#{(target =~ /^(\w+)/) && $1.downcase}.rhtml"
|
||||
title = target
|
||||
output = nil
|
||||
job.report(title) do
|
||||
output = self.__send__(method, filename, @context)
|
||||
end
|
||||
File.write("output.#{target.gsub(/[^\w]/,'')}", output) if @printout && output && !output.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
|
||||
def execute_eruby(filename, context)
|
||||
return unless ERuby
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
@ntimes.times do
|
||||
ERuby.import(filename)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
def execute_erb(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
eruby = ERB.new(File.read(filename))
|
||||
output = eruby.result(binding())
|
||||
print output
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
def execute_erb_cached(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
cachefile = filename + '.cache'
|
||||
File.unlink(cachefile) if test(?f, cachefile)
|
||||
@ntimes.times do
|
||||
if !test(?f, cachefile) || File.mtime(filename) > File.mtime(cachefile)
|
||||
eruby = ERB.new(File.read(filename))
|
||||
File.write(cachefile, eruby.src)
|
||||
else
|
||||
eruby = ERB.new('')
|
||||
#eruby.src = File.read(cachefile)
|
||||
eruby.instance_variable_set("@src", File.read(cachefile))
|
||||
end
|
||||
output = eruby.result(binding())
|
||||
print output
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
## no cached
|
||||
for klass in %w[Eruby FastEruby TinyEruby ArrayBufferEruby PrintOutEruby StdoutEruby] do
|
||||
s = <<-END
|
||||
def execute_erubis_#{klass.downcase}(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
eruby = Erubis::#{klass}.new(File.read(filename))
|
||||
output = eruby.result(binding())
|
||||
print output
|
||||
end
|
||||
return output
|
||||
end
|
||||
END
|
||||
eval s
|
||||
end
|
||||
|
||||
## cached
|
||||
for klass in %w[Eruby FastEruby] do
|
||||
s = <<-END
|
||||
def execute_erubis_#{klass.downcase}_cached(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
cachefile = filename + '.cache'
|
||||
File.unlink(cachefile) if test(?f, cachefile)
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
eruby = Erubis::#{klass}.load_file(filename)
|
||||
output = eruby.result(binding())
|
||||
print output
|
||||
end
|
||||
savefile = cachefile.sub(/\\.cache$/, '.#{klass.downcase}.cache')
|
||||
File.rename(cachefile, savefile)
|
||||
return output
|
||||
end
|
||||
END
|
||||
eval s
|
||||
end
|
||||
|
||||
##
|
||||
|
||||
def convert_eruby(filename, context)
|
||||
return unless ERuby
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
output = ERuby::Compiler.new.compile_string(File.read(filename))
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
def convert_erb(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
eruby = ERB.new(File.read(filename))
|
||||
output = eruby.src
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
for klass in %w[Eruby FastEruby TinyEruby]
|
||||
s = <<-END
|
||||
def convert_erubis_#{klass.downcase}(filename, context)
|
||||
#eval context2code(context)
|
||||
list = context['list']
|
||||
output = nil
|
||||
@ntimes.times do
|
||||
eruby = Erubis::#{klass}.new(File.read(filename))
|
||||
output = eruby.src
|
||||
end
|
||||
return output
|
||||
end
|
||||
END
|
||||
eval s
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
require 'optparse'
|
||||
|
||||
class MainApplication
|
||||
|
||||
def parse_argv(argv=ARGV)
|
||||
optparser = OptionParser.new
|
||||
options = {}
|
||||
['-h', '-n N', '-t erubyfile', '-f contextfile', '-A', '-e',
|
||||
'-x exclude', '-m testmode', '-X', '-p', '-D'].each do |opt|
|
||||
optparser.on(opt) { |val| options[opt[1].chr] = val }
|
||||
end
|
||||
begin
|
||||
targets = optparser.parse!(argv)
|
||||
rescue => ex
|
||||
$stderr.puts "#{@script}: #{ex.to_s}"
|
||||
exit(1)
|
||||
end
|
||||
return options, targets
|
||||
end
|
||||
|
||||
def execute
|
||||
@script = File.basename($0)
|
||||
ntimes = 1000
|
||||
targets = BenchmarkApplication::TARGETS.dup
|
||||
testmode = 'execute'
|
||||
contextfile = 'bench_context.yaml'
|
||||
#
|
||||
options, args = parse_argv(ARGV)
|
||||
ntimes = options['n'].to_i if options['n']
|
||||
targets = args if args && !args.empty?
|
||||
targets = targets - options['x'].split(/,/) if options['x']
|
||||
testmode = options['m'] if options['m']
|
||||
contextfile = options['f'] if options['f']
|
||||
erubyfile = options['t'] if options['t']
|
||||
#
|
||||
if options['h']
|
||||
$stderr.puts "Usage: ruby #{@script} [..options..] [..targets..]"
|
||||
$stderr.puts " -h : help"
|
||||
$stderr.puts " -n N : loop N times"
|
||||
$stderr.puts " -f datafile : context data filename (*.yaml)"
|
||||
$stderr.puts " -x exclude : exclude target name"
|
||||
$stdout.puts " -m testmode : 'execute' or 'convert' (default 'execute')"
|
||||
$stderr.puts " -p : print output to file (filename: 'output.TARGETNAME')"
|
||||
return
|
||||
end
|
||||
#
|
||||
#if ! options['t']
|
||||
for item in %w[eruby erb erubis]
|
||||
fname = "bench_#{item}.rhtml"
|
||||
header = File.read("templates/_header.html")
|
||||
#body = File.read("templates/#{erubyfile}")
|
||||
body = File.read("templates/#{fname}")
|
||||
footer = File.read("templates/_footer.html")
|
||||
content = header + body + footer
|
||||
File.write(fname, content)
|
||||
end
|
||||
#
|
||||
if options['e'] # escape
|
||||
tuples = [
|
||||
[ 'bench_eruby.rhtml', '<%= CGI.escapeHTML((\1).to_s) %>' ],
|
||||
[ 'bench_erb.rhtml', '<%=h \1 %>' ],
|
||||
[ 'bench_erubis.rhtml', '<%== \1 %>' ],
|
||||
]
|
||||
for fname, replace in tuples
|
||||
content = File.read(fname).gsub(/<%= ?(.*?) ?%>/, replace)
|
||||
File.write(fname, content)
|
||||
end
|
||||
targets.delete('Erubis::TinyEruby') ## because TinyEruby doesn't support '<%== =>'
|
||||
end
|
||||
#
|
||||
context = YAML.load_file(contextfile)
|
||||
#
|
||||
params = {
|
||||
:printout=>options['p'],
|
||||
:testmode=>testmode,
|
||||
}
|
||||
app = BenchmarkApplication.new(ntimes, context, targets, params)
|
||||
app.perform_benchmark()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
if __FILE__ == $0
|
||||
|
||||
## open /dev/null
|
||||
$stdout = File.open('/dev/null', 'w')
|
||||
at_exit do
|
||||
$stdout.close()
|
||||
end
|
||||
|
||||
## start benchmark
|
||||
MainApplication.new().execute()
|
||||
|
||||
end
|
141
vendor/plugins/erubis/benchmark/bench_context.yaml
vendored
141
vendor/plugins/erubis/benchmark/bench_context.yaml
vendored
|
@ -1,141 +0,0 @@
|
|||
list:
|
||||
- name: Adobe Systems
|
||||
name2: Adobe Systems Inc.
|
||||
url: http://www.adobe.com
|
||||
symbol: ADBE
|
||||
price: 39.26
|
||||
change: 0.13
|
||||
ratio: 0.33
|
||||
- name: Advanced Micro Devices
|
||||
name2: Advanced Micro Devices Inc.
|
||||
url: http://www.amd.com
|
||||
symbol: AMD
|
||||
price: 16.22
|
||||
change: 0.17
|
||||
ratio: 1.06
|
||||
- name: Amazon.com
|
||||
name2: Amazon.com Inc
|
||||
url: http://www.amazon.com
|
||||
symbol: AMZN
|
||||
price: 36.85
|
||||
change: -0.23
|
||||
ratio: -0.62
|
||||
- name: Apple
|
||||
name2: Apple Inc.
|
||||
url: http://www.apple.com
|
||||
symbol: AAPL
|
||||
price: 85.38
|
||||
change: -0.87
|
||||
ratio: -1.01
|
||||
- name: BEA Systems
|
||||
name2: BEA Systems Inc.
|
||||
url: http://www.bea.com
|
||||
symbol: BEAS
|
||||
price: 12.46
|
||||
change: 0.09
|
||||
ratio: 0.73
|
||||
- name: CA
|
||||
name2: CA, Inc.
|
||||
url: http://www.ca.com
|
||||
symbol: CA
|
||||
price: 24.66
|
||||
change: 0.38
|
||||
ratio: 1.57
|
||||
- name: Cisco Systems
|
||||
name2: Cisco Systems Inc.
|
||||
url: http://www.cisco.com
|
||||
symbol: CSCO
|
||||
price: 26.35
|
||||
change: 0.13
|
||||
ratio: 0.5
|
||||
- name: Dell
|
||||
name2: Dell Corp.
|
||||
url: http://www.dell.com/
|
||||
symbol: DELL
|
||||
price: 23.73
|
||||
change: -0.42
|
||||
ratio: -1.74
|
||||
- name: eBay
|
||||
name2: eBay Inc.
|
||||
url: http://www.ebay.com
|
||||
symbol: EBAY
|
||||
price: 31.65
|
||||
change: -0.8
|
||||
ratio: -2.47
|
||||
- name: Google
|
||||
name2: Google Inc.
|
||||
url: http://www.google.com
|
||||
symbol: GOOG
|
||||
price: 495.84
|
||||
change: 7.75
|
||||
ratio: 1.59
|
||||
- name: Hewlett-Packard
|
||||
name2: Hewlett-Packard Co.
|
||||
url: http://www.hp.com
|
||||
symbol: HPQ
|
||||
price: 41.69
|
||||
change: -0.02
|
||||
ratio: -0.05
|
||||
- name: IBM
|
||||
name2: International Business Machines Corp.
|
||||
url: http://www.ibm.com
|
||||
symbol: IBM
|
||||
price: 97.45
|
||||
change: -0.06
|
||||
ratio: -0.06
|
||||
- name: Intel
|
||||
name2: Intel Corp.
|
||||
url: http://www.intel.com
|
||||
symbol: INTC
|
||||
price: 20.53
|
||||
change: -0.07
|
||||
ratio: -0.34
|
||||
- name: Juniper Networks
|
||||
name2: Juniper Networks, Inc
|
||||
url: http://www.juniper.net/
|
||||
symbol: JNPR
|
||||
price: 18.96
|
||||
change: 0.5
|
||||
ratio: 2.71
|
||||
- name: Microsoft
|
||||
name2: Microsoft Corp
|
||||
url: http://www.microsoft.com
|
||||
symbol: MSFT
|
||||
price: 30.6
|
||||
change: 0.15
|
||||
ratio: 0.49
|
||||
- name: Oracle
|
||||
name2: Oracle Corp.
|
||||
url: http://www.oracle.com
|
||||
symbol: ORCL
|
||||
price: 17.15
|
||||
change: 0.17
|
||||
ratio: 1.0
|
||||
- name: SAP
|
||||
name2: SAP AG
|
||||
url: http://www.sap.com
|
||||
symbol: SAP
|
||||
price: 46.2
|
||||
change: -0.16
|
||||
ratio: -0.35
|
||||
- name: Seagate Technology
|
||||
name2: Seagate Technology
|
||||
url: http://www.seagate.com/
|
||||
symbol: STX
|
||||
price: 27.35
|
||||
change: -0.36
|
||||
ratio: -1.3
|
||||
- name: Sun Microsystems
|
||||
name2: Sun Microsystems Inc.
|
||||
url: http://www.sun.com
|
||||
symbol: SUNW
|
||||
price: 6.33
|
||||
change: -0.01
|
||||
ratio: -0.16
|
||||
- name: Yahoo
|
||||
name2: Yahoo! Inc.
|
||||
url: http://www.yahoo.com
|
||||
symbol: YHOO
|
||||
price: 28.04
|
||||
change: -0.17
|
||||
ratio: -0.6
|
|
@ -1,4 +0,0 @@
|
|||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Stock Prices</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css" media="all" />
|
||||
<script type="text/javascript" src="/js/util.js"></script>
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
|
||||
body {
|
||||
color: #333333;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
thead {
|
||||
font-weight: bold;
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.odd {
|
||||
background-color: #FFCCCC;
|
||||
}
|
||||
|
||||
.even {
|
||||
background-color: #CCCCFF;
|
||||
}
|
||||
|
||||
.minus {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
/*]]>*/
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Stock Prices</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th><th>symbol</th><th>name</th><th>price</th><th>change</th><th>ratio</th>
|
||||
</tr>
|
||||
</thead>
|
|
@ -1,29 +0,0 @@
|
|||
<tbody>
|
||||
<%
|
||||
n = 0
|
||||
for item in list
|
||||
n += 1
|
||||
%>
|
||||
<tr class="<%= n % 2 == 0 ? 'even' : 'odd' %>">
|
||||
<td style="text-align: center"><%= n %></td>
|
||||
<td>
|
||||
<a href="/stocks/<%= item['symbol'] %>"><%= item['symbol'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<%= item['url'] %>"><%= item['name'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<strong><%= item['price'] %></strong>
|
||||
</td>
|
||||
<% if item['change'] < 0.0 %>
|
||||
<td class="minus"><%= item['change'] %></td>
|
||||
<td class="minus"><%= item['ratio'] %></td>
|
||||
<% else %>
|
||||
<td><%= item['change'] %></td>
|
||||
<td><%= item['ratio'] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
</tbody>
|
|
@ -1,29 +0,0 @@
|
|||
<tbody>
|
||||
<%
|
||||
n = 0
|
||||
for item in list
|
||||
n += 1
|
||||
%>
|
||||
<tr class="<%= n % 2 == 0 ? 'even' : 'odd' %>">
|
||||
<td style="text-align: center"><%= n %></td>
|
||||
<td>
|
||||
<a href="/stocks/<%= item['symbol'] %>"><%= item['symbol'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<%= item['url'] %>"><%= item['name'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<strong><%= item['price'] %></strong>
|
||||
</td>
|
||||
<% if item['change'] < 0.0 %>
|
||||
<td class="minus"><%= item['change'] %></td>
|
||||
<td class="minus"><%= item['ratio'] %></td>
|
||||
<% else %>
|
||||
<td><%= item['change'] %></td>
|
||||
<td><%= item['ratio'] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
</tbody>
|
|
@ -1,29 +0,0 @@
|
|||
<tbody>
|
||||
<%
|
||||
n = 0
|
||||
for item in list
|
||||
n += 1
|
||||
%>
|
||||
<tr class="<%= n % 2 == 0 ? 'even' : 'odd' %>">
|
||||
<td style="text-align: center"><%= n %></td>
|
||||
<td>
|
||||
<a href="/stocks/<%= item['symbol'] %>"><%= item['symbol'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<%= item['url'] %>"><%= item['name'] %></a>
|
||||
</td>
|
||||
<td>
|
||||
<strong><%= item['price'] %></strong>
|
||||
</td>
|
||||
<% if item['change'] < 0.0 %>
|
||||
<td class="minus"><%= item['change'] %></td>
|
||||
<td class="minus"><%= item['ratio'] %></td>
|
||||
<% else %>
|
||||
<td><%= item['change'] %></td>
|
||||
<td><%= item['ratio'] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
</tbody>
|
10
vendor/plugins/erubis/bin/erubis
vendored
10
vendor/plugins/erubis/bin/erubis
vendored
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
###
|
||||
### $Release: 2.6.6 $
|
||||
### copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
###
|
||||
|
||||
require 'erubis/main'
|
||||
|
||||
Erubis::Main.main(ARGV)
|
3330
vendor/plugins/erubis/contrib/erubis
vendored
3330
vendor/plugins/erubis/contrib/erubis
vendored
File diff suppressed because it is too large
Load diff
132
vendor/plugins/erubis/contrib/erubis-run.rb
vendored
132
vendor/plugins/erubis/contrib/erubis-run.rb
vendored
|
@ -1,132 +0,0 @@
|
|||
=begin
|
||||
|
||||
= apache/erubis-run.rb
|
||||
|
||||
Copyright (C) 2007 Andrew R Jackson <arjackson at acm dot org>
|
||||
|
||||
Built from original by Shugo Maeda:
|
||||
Copyright (C) 2001 Shugo Maeda <shugo@modruby.net>
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WAreqANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WAreqANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTEreqUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
== Overview
|
||||
|
||||
Apache::ErubisRun handles eRuby files with erubis
|
||||
|
||||
== Example of httpd.conf
|
||||
|
||||
RubyRequire apache/erubis-run
|
||||
<Location /eruby>
|
||||
SetHandler ruby-object
|
||||
RubyHandler Apache::ErubisRun.instance
|
||||
</Location>
|
||||
|
||||
=end
|
||||
|
||||
require "singleton"
|
||||
require "tempfile"
|
||||
require "eruby" # Still needed to bring in a couple useful helper methods
|
||||
require "erubis"
|
||||
|
||||
module Erubis
|
||||
@@cgi = nil
|
||||
|
||||
def self.cgi
|
||||
return @@cgi
|
||||
end
|
||||
|
||||
def self.cgi=(cgi)
|
||||
@@cgi = cgi
|
||||
end
|
||||
end
|
||||
|
||||
module Apache
|
||||
class ErubisRun
|
||||
include Singleton
|
||||
|
||||
def handler(req)
|
||||
status = check_request(req)
|
||||
return status if(status != OK)
|
||||
|
||||
filename = req.filename.dup
|
||||
filename.untaint
|
||||
erubis = compile(filename)
|
||||
prerun(req)
|
||||
begin
|
||||
run(erubis, filename)
|
||||
ensure
|
||||
postrun(req)
|
||||
end
|
||||
|
||||
return OK
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def initialize
|
||||
@compiler = nil
|
||||
end
|
||||
|
||||
def check_request(req)
|
||||
if(req.method_number == M_OPTIONS)
|
||||
req.allowed |= (1 << M_GET)
|
||||
req.allowed |= (1 << M_POST)
|
||||
return DECLINED
|
||||
end
|
||||
if(req.finfo.mode == 0)
|
||||
return NOT_FOUND
|
||||
end
|
||||
return OK
|
||||
end
|
||||
|
||||
def compile(filename)
|
||||
@compiler = Erubis::Eruby.load_file(filename) # use caching version as much as possible
|
||||
return @compiler
|
||||
end
|
||||
|
||||
def prerun(req)
|
||||
Erubis.cgi = nil
|
||||
req.setup_cgi_env
|
||||
Apache.chdir_file(req.filename)
|
||||
end
|
||||
|
||||
def run(erubis, filename)
|
||||
binding = eval_string_wrap("binding")
|
||||
puts erubis.result(binding) # eval the code in the context of the same binding ERuby uses
|
||||
end
|
||||
|
||||
def postrun(req)
|
||||
if(cgi = Erubis.cgi)
|
||||
# TODO: pull the content type header from the cgi object, if set there?
|
||||
elsif(req.sync_output or req.sync_header)
|
||||
# Do nothing: header has already been sent
|
||||
else
|
||||
unless(req.content_type)
|
||||
req.content_type = format("text/html;")
|
||||
end
|
||||
req.send_http_header
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
179
vendor/plugins/erubis/contrib/inline-require
vendored
179
vendor/plugins/erubis/contrib/inline-require
vendored
|
@ -1,179 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
###
|
||||
### inline-require - expand 'require "foo"' into inline code
|
||||
###
|
||||
### usage: inline-require [-h] [-I path[,path2,..]] script
|
||||
###
|
||||
### copyright(c) 2006-2010 kuwata-lab.com all rights reserved.
|
||||
### 2.6.6
|
||||
### $Rev: 10 $
|
||||
###
|
||||
|
||||
|
||||
class InlineRequire
|
||||
|
||||
def initialize(opts={})
|
||||
@opts = opts.dup
|
||||
end
|
||||
attr_accessor :opts
|
||||
|
||||
def expand(filename)
|
||||
sbuf = ''
|
||||
inlined = []
|
||||
level = 0
|
||||
expand_require(filename, sbuf, inlined, level)
|
||||
return sbuf
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def expand_require(filename, sbuf, inlined, level)
|
||||
raise "*** assertion error" if inlined.include?(filename)
|
||||
remove_comment = @opts[:remove_comment]
|
||||
expand_indented = @opts[:expand_indented]
|
||||
keep_filename = @opts[:keep_filename]
|
||||
loaded_features = @opts[:loaded_features]
|
||||
inlined << filename
|
||||
prog = File.read(filename)
|
||||
n = 0
|
||||
flag_if_file = false
|
||||
prog.each_line do |line|
|
||||
n += 1
|
||||
|
||||
## comment out from 'if __FILE__ == $0' to 'end'
|
||||
if level > 0
|
||||
if flag_if_file
|
||||
sbuf << "#" << line
|
||||
flag_if_file = false if line =~ /^end$/
|
||||
next
|
||||
end
|
||||
if line =~ /^if\s+__FILE__\s*==\s*\$0(\s+then)?$/ || line =~ /^if\s+\$0\s*==\s*__FILE__(\s+then)?$/
|
||||
flag_if_file = true
|
||||
sbuf << "#" << line
|
||||
next
|
||||
end
|
||||
end
|
||||
|
||||
## find 'require "foo"' and expand it to inline code
|
||||
flag_inline = false
|
||||
pattern = expand_indented ? /^[ \t]*require ['"](.*)["']\s*$/ \
|
||||
: /^require ['"](.*)["']\s*$/
|
||||
if line =~ pattern
|
||||
libname = $1
|
||||
libpath = find_library(libname)
|
||||
$stderr.puts "*** debug: libpath=#{libpath.inspect}" if $debug_mode
|
||||
unless libpath
|
||||
#raise "file '#{filename}'(line #{n}): library '#{libname}' not found."
|
||||
warn "file '#{filename}'(line #{n}): library '#{libname}' not found."
|
||||
else
|
||||
flag_inline = true if libpath =~ /\.rb$/ && local_library?(libpath)
|
||||
end
|
||||
end
|
||||
if !flag_inline
|
||||
sbuf << line unless remove_comment && line =~ /^[ \t]*\#/
|
||||
elsif inlined.include?(libpath)
|
||||
sbuf << "#--already included #{line}" unless remove_comment
|
||||
else
|
||||
if keep_filename
|
||||
@n ||= 0; @n += 1; n = @n
|
||||
end
|
||||
sbuf << "#--begin of #{line}" unless remove_comment
|
||||
sbuf << "$LOADED_FEATURES << '#{libname}.rb'\n" if loaded_features
|
||||
sbuf << "eval <<'END_OF_SCRIPT__#{n}', TOPLEVEL_BINDING, '#{libpath}', 1\n" if keep_filename
|
||||
expand_require(libpath, sbuf, inlined, level+1)
|
||||
sbuf << "END_OF_SCRIPT__#{n}\n" if keep_filename
|
||||
sbuf << "#--end of #{line}" unless remove_comment
|
||||
end
|
||||
end
|
||||
#sbuf << "\n" if sbuf[-1] != ?\n
|
||||
end
|
||||
|
||||
def local_library?(libpath)
|
||||
return libpath !~ /^\//
|
||||
end
|
||||
|
||||
def find_library(libname)
|
||||
if libname =~ /^\.rb$/
|
||||
libname_rb = libname
|
||||
libname_so = nil
|
||||
elsif libname =~ /^\.so$/
|
||||
libname_rb = nil
|
||||
libname_so = libname
|
||||
else
|
||||
libname_rb = libname + ".rb"
|
||||
libname_so = libname + ".so"
|
||||
end
|
||||
$LOAD_PATH.each do |path|
|
||||
if libname_rb
|
||||
libpath = path + "/" + libname_rb
|
||||
return libpath if test(?f, libpath)
|
||||
end
|
||||
if libname_so
|
||||
libpath = path + "/" + libname_so
|
||||
return libpath if test(?f, libpath)
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if __FILE__ == $0
|
||||
|
||||
begin
|
||||
require "optparse"
|
||||
op = OptionParser.new
|
||||
options = {}
|
||||
op.on("-h", "--help") {|v| options[:help] = v }
|
||||
op.on("-I libpath") {|v| options[:libpath] = v }
|
||||
op.on("-i") {|v| options[:expand_indented] = v }
|
||||
op.on("-c") {|v| options[:remove_comment] = v }
|
||||
op.on("-k") {|v| options[:keep_filename] = v }
|
||||
op.on("-l") {|v| options[:loaded_features] = v }
|
||||
op.on("-D") {|v| options[:debug] = v }
|
||||
op.parse!()
|
||||
|
||||
$debug_mode = options[:debug]
|
||||
|
||||
if options[:help]
|
||||
command = File.basename($0)
|
||||
puts "Usage: #{command} [-h] [-I path[,path2,..]] script"
|
||||
puts " -h : help"
|
||||
puts " -i : expand indented require(), too"
|
||||
puts " -c : remove comment lines start with '#'"
|
||||
puts " -k : keep filename (for debugging)"
|
||||
puts " -l : append libs to $LOADED_FEATURES"
|
||||
puts " -I path[,path2,...] : ruby library path"
|
||||
exit(0)
|
||||
end
|
||||
|
||||
if options[:libpath]
|
||||
rubylib_paths = options[:libpath].split(/,/)
|
||||
else
|
||||
rubylib_paths = []
|
||||
end
|
||||
$stderr.puts "*** debug: rubylib_paths=#{rubylib_paths.inspect}" if $debug_mode
|
||||
$LOAD_PATH.concat(rubylib_paths)
|
||||
|
||||
filenames = ARGV
|
||||
|
||||
opts = { :expand_indented => options[:expand_indented],
|
||||
:remove_comment => options[:remove_comment],
|
||||
:keep_filename => options[:keep_filename],
|
||||
:loaded_features => options[:loaded_features] }
|
||||
inline_require = InlineRequire.new(opts)
|
||||
filenames.each do |filename|
|
||||
print inline_require.expand(filename)
|
||||
end
|
||||
|
||||
rescue => ex
|
||||
if $debug_mode
|
||||
raise ex
|
||||
else
|
||||
$stderr.puts ex.message
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -1,105 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,209 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: ActionView::TemplateHandlers::ErubisHandler</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">ActionView::TemplateHandlers::ErubisHandler</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
TemplateHandler
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000001">compile</a>
|
||||
<a href="#M000002">compile</a>
|
||||
<a href="#M000003">compile</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name">Compilable</span>
|
||||
<span class="include-name"><a href="../../Erubis/Helpers/RailsHelper/TemplateConverter.html">::Erubis::Helpers::RailsHelper::TemplateConverter</a></span>
|
||||
<span class="include-name"><a href="../../Erubis/PreprocessingHelper.html">::Erubis::PreprocessingHelper</a></span>
|
||||
<span class="include-name">Compilable</span>
|
||||
<span class="include-name"><a href="../../Erubis/Helpers/RailsHelper/TemplateConverter.html">Erubis::Helpers::RailsHelper::TemplateConverter</a></span>
|
||||
<span class="include-name"><a href="../../Erubis/PreprocessingHelper.html">Erubis::PreprocessingHelper</a></span>
|
||||
<span class="include-name"><a href="../../Erubis/Helpers/RailsHelper/TemplateConverter.html">Erubis::Helpers::RailsHelper::TemplateConverter</a></span>
|
||||
<span class="include-name"><a href="../../Erubis/PreprocessingHelper.html">Erubis::PreprocessingHelper</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000001" class="method-detail">
|
||||
<a name="M000001"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000001" class="method-signature">
|
||||
<span class="method-name">compile</span><span class="method-args">(template)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000001-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 153</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">template</span>)
|
||||
<span class="ruby-comment cmt">#src = ::ERB.new("<% __in_erb_template=true %>#{template.source}", nil, erb_trim_mode, '@output_buffer').src</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_convert_template</span>(<span class="ruby-node">"<% __in_erb_template=true %>#{template.source}"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000002" class="method-detail">
|
||||
<a name="M000002"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000002" class="method-signature">
|
||||
<span class="method-name">compile</span><span class="method-args">(template)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000002-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 179</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">template</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_convert_template</span>(<span class="ruby-identifier">template</span>.<span class="ruby-identifier">source</span>) <span class="ruby-comment cmt"># template.is_a?(ActionView::Template)</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000003" class="method-signature">
|
||||
<span class="method-name">compile</span><span class="method-args">(template)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000003-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 209</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">template</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_convert_template</span>(<span class="ruby-identifier">template</span>) <span class="ruby-comment cmt"># template.is_a?(String)</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
101
vendor/plugins/erubis/doc-api/classes/ERB.html
vendored
101
vendor/plugins/erubis/doc-api/classes/ERB.html
vendored
|
@ -1,101 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ERB</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ERB</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
353
vendor/plugins/erubis/doc-api/classes/Erubis.html
vendored
353
vendor/plugins/erubis/doc-api/classes/Erubis.html
vendored
|
@ -1,353 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/erubis/context_rb.html">
|
||||
erubis/context.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/ec_rb.html">
|
||||
erubis/engine/ec.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/ejava_rb.html">
|
||||
erubis/engine/ejava.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/ejavascript_rb.html">
|
||||
erubis/engine/ejavascript.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/eperl_rb.html">
|
||||
erubis/engine/eperl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/ephp_rb.html">
|
||||
erubis/engine/ephp.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/escheme_rb.html">
|
||||
erubis/engine/escheme.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine/optimized_rb.html">
|
||||
erubis/engine/optimized.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/engine_rb.html">
|
||||
erubis/engine.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/error_rb.html">
|
||||
erubis/error.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/evaluator_rb.html">
|
||||
erubis/evaluator.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/generator_rb.html">
|
||||
erubis/generator.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/helper_rb.html">
|
||||
erubis/helper.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/helpers/rails_form_helper_rb.html">
|
||||
erubis/helpers/rails_form_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/main_rb.html">
|
||||
erubis/main.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/preprocessing_rb.html">
|
||||
erubis/preprocessing.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis/tiny_rb.html">
|
||||
erubis/tiny.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/erubis_rb.html">
|
||||
erubis.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
an implementation of eRuby
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
input = <<'END'
|
||||
<ul>
|
||||
<% for item in @list %>
|
||||
<li><%= item %>
|
||||
<%== item %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
END
|
||||
list = ['<aaa>', 'b&b', '"ccc"']
|
||||
eruby = Erubis::Eruby.new(input)
|
||||
puts "--- code ---"
|
||||
puts eruby.src
|
||||
puts "--- result ---"
|
||||
context = Erubis::Context.new() # or new(:list=>list)
|
||||
context[:list] = list
|
||||
puts eruby.evaluate(context)
|
||||
</pre>
|
||||
<p>
|
||||
result:
|
||||
</p>
|
||||
<pre>
|
||||
--- source ---
|
||||
_buf = ''; _buf << '<ul>
|
||||
'; for item in @list
|
||||
_buf << ' <li>'; _buf << ( item ).to_s; _buf << '
|
||||
'; _buf << ' '; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</li>
|
||||
'; end
|
||||
_buf << '</ul>
|
||||
';
|
||||
_buf.to_s
|
||||
--- result ---
|
||||
<ul>
|
||||
<li><aaa>
|
||||
&lt;aaa&gt;</li>
|
||||
<li>b&b
|
||||
b&amp;b</li>
|
||||
<li>"ccc"
|
||||
&quot;ccc&quot;</li>
|
||||
</ul>
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="Erubis/ArrayBufferEnhancer.html" class="link">Erubis::ArrayBufferEnhancer</a><br />
|
||||
Module <a href="Erubis/ArrayEnhancer.html" class="link">Erubis::ArrayEnhancer</a><br />
|
||||
Module <a href="Erubis/Basic.html" class="link">Erubis::Basic</a><br />
|
||||
Module <a href="Erubis/BiPatternEnhancer.html" class="link">Erubis::BiPatternEnhancer</a><br />
|
||||
Module <a href="Erubis/CGenerator.html" class="link">Erubis::CGenerator</a><br />
|
||||
Module <a href="Erubis/Converter.html" class="link">Erubis::Converter</a><br />
|
||||
Module <a href="Erubis/DeleteIndentEnhancer.html" class="link">Erubis::DeleteIndentEnhancer</a><br />
|
||||
Module <a href="Erubis/ErboutEnhancer.html" class="link">Erubis::ErboutEnhancer</a><br />
|
||||
Module <a href="Erubis/EscapeEnhancer.html" class="link">Erubis::EscapeEnhancer</a><br />
|
||||
Module <a href="Erubis/Evaluator.html" class="link">Erubis::Evaluator</a><br />
|
||||
Module <a href="Erubis/Generator.html" class="link">Erubis::Generator</a><br />
|
||||
Module <a href="Erubis/HeaderFooterEnhancer.html" class="link">Erubis::HeaderFooterEnhancer</a><br />
|
||||
Module <a href="Erubis/Helpers.html" class="link">Erubis::Helpers</a><br />
|
||||
Module <a href="Erubis/InterpolationEnhancer.html" class="link">Erubis::InterpolationEnhancer</a><br />
|
||||
Module <a href="Erubis/JavaGenerator.html" class="link">Erubis::JavaGenerator</a><br />
|
||||
Module <a href="Erubis/JavascriptGenerator.html" class="link">Erubis::JavascriptGenerator</a><br />
|
||||
Module <a href="Erubis/NoCodeEnhancer.html" class="link">Erubis::NoCodeEnhancer</a><br />
|
||||
Module <a href="Erubis/NoTextEnhancer.html" class="link">Erubis::NoTextEnhancer</a><br />
|
||||
Module <a href="Erubis/OptimizedGenerator.html" class="link">Erubis::OptimizedGenerator</a><br />
|
||||
Module <a href="Erubis/PI.html" class="link">Erubis::PI</a><br />
|
||||
Module <a href="Erubis/PercentLineEnhancer.html" class="link">Erubis::PercentLineEnhancer</a><br />
|
||||
Module <a href="Erubis/PerlGenerator.html" class="link">Erubis::PerlGenerator</a><br />
|
||||
Module <a href="Erubis/PhpGenerator.html" class="link">Erubis::PhpGenerator</a><br />
|
||||
Module <a href="Erubis/PreprocessingHelper.html" class="link">Erubis::PreprocessingHelper</a><br />
|
||||
Module <a href="Erubis/PrintEnabledEnhancer.html" class="link">Erubis::PrintEnabledEnhancer</a><br />
|
||||
Module <a href="Erubis/PrintOutEnhancer.html" class="link">Erubis::PrintOutEnhancer</a><br />
|
||||
Module <a href="Erubis/RubyEvaluator.html" class="link">Erubis::RubyEvaluator</a><br />
|
||||
Module <a href="Erubis/RubyGenerator.html" class="link">Erubis::RubyGenerator</a><br />
|
||||
Module <a href="Erubis/SchemeGenerator.html" class="link">Erubis::SchemeGenerator</a><br />
|
||||
Module <a href="Erubis/SimplifyEnhancer.html" class="link">Erubis::SimplifyEnhancer</a><br />
|
||||
Module <a href="Erubis/StdoutEnhancer.html" class="link">Erubis::StdoutEnhancer</a><br />
|
||||
Module <a href="Erubis/StringBufferEnhancer.html" class="link">Erubis::StringBufferEnhancer</a><br />
|
||||
Module <a href="Erubis/XmlHelper.html" class="link">Erubis::XmlHelper</a><br />
|
||||
Class <a href="Erubis/ArrayBufferEruby.html" class="link">Erubis::ArrayBufferEruby</a><br />
|
||||
Class <a href="Erubis/ArrayEruby.html" class="link">Erubis::ArrayEruby</a><br />
|
||||
Class <a href="Erubis/BiPatternEruby.html" class="link">Erubis::BiPatternEruby</a><br />
|
||||
Class <a href="Erubis/CommandOptionError.html" class="link">Erubis::CommandOptionError</a><br />
|
||||
Class <a href="Erubis/Context.html" class="link">Erubis::Context</a><br />
|
||||
Class <a href="Erubis/DeleteIndentEruby.html" class="link">Erubis::DeleteIndentEruby</a><br />
|
||||
Class <a href="Erubis/Ec.html" class="link">Erubis::Ec</a><br />
|
||||
Class <a href="Erubis/Ejava.html" class="link">Erubis::Ejava</a><br />
|
||||
Class <a href="Erubis/Ejavascript.html" class="link">Erubis::Ejavascript</a><br />
|
||||
Class <a href="Erubis/Engine.html" class="link">Erubis::Engine</a><br />
|
||||
Class <a href="Erubis/Eperl.html" class="link">Erubis::Eperl</a><br />
|
||||
Class <a href="Erubis/Ephp.html" class="link">Erubis::Ephp</a><br />
|
||||
Class <a href="Erubis/ErboutEruby.html" class="link">Erubis::ErboutEruby</a><br />
|
||||
Class <a href="Erubis/ErubisError.html" class="link">Erubis::ErubisError</a><br />
|
||||
Class <a href="Erubis/Eruby.html" class="link">Erubis::Eruby</a><br />
|
||||
Class <a href="Erubis/EscapedEc.html" class="link">Erubis::EscapedEc</a><br />
|
||||
Class <a href="Erubis/EscapedEjava.html" class="link">Erubis::EscapedEjava</a><br />
|
||||
Class <a href="Erubis/EscapedEjavascript.html" class="link">Erubis::EscapedEjavascript</a><br />
|
||||
Class <a href="Erubis/EscapedEperl.html" class="link">Erubis::EscapedEperl</a><br />
|
||||
Class <a href="Erubis/EscapedEphp.html" class="link">Erubis::EscapedEphp</a><br />
|
||||
Class <a href="Erubis/EscapedEruby.html" class="link">Erubis::EscapedEruby</a><br />
|
||||
Class <a href="Erubis/EscapedEscheme.html" class="link">Erubis::EscapedEscheme</a><br />
|
||||
Class <a href="Erubis/Escheme.html" class="link">Erubis::Escheme</a><br />
|
||||
Class <a href="Erubis/FastEruby.html" class="link">Erubis::FastEruby</a><br />
|
||||
Class <a href="Erubis/HeaderFooterEruby.html" class="link">Erubis::HeaderFooterEruby</a><br />
|
||||
Class <a href="Erubis/InterpolationEruby.html" class="link">Erubis::InterpolationEruby</a><br />
|
||||
Class <a href="Erubis/Main.html" class="link">Erubis::Main</a><br />
|
||||
Class <a href="Erubis/NoCodeEruby.html" class="link">Erubis::NoCodeEruby</a><br />
|
||||
Class <a href="Erubis/NoTextEruby.html" class="link">Erubis::NoTextEruby</a><br />
|
||||
Class <a href="Erubis/NotSupportedError.html" class="link">Erubis::NotSupportedError</a><br />
|
||||
Class <a href="Erubis/OptimizedEruby.html" class="link">Erubis::OptimizedEruby</a><br />
|
||||
Class <a href="Erubis/OptimizedXmlEruby.html" class="link">Erubis::OptimizedXmlEruby</a><br />
|
||||
Class <a href="Erubis/PercentLineEruby.html" class="link">Erubis::PercentLineEruby</a><br />
|
||||
Class <a href="Erubis/PreprocessingEruby.html" class="link">Erubis::PreprocessingEruby</a><br />
|
||||
Class <a href="Erubis/PrintEnabledEruby.html" class="link">Erubis::PrintEnabledEruby</a><br />
|
||||
Class <a href="Erubis/PrintOutEruby.html" class="link">Erubis::PrintOutEruby</a><br />
|
||||
Class <a href="Erubis/PrintOutSimplifiedEruby.html" class="link">Erubis::PrintOutSimplifiedEruby</a><br />
|
||||
Class <a href="Erubis/SimplifiedEruby.html" class="link">Erubis::SimplifiedEruby</a><br />
|
||||
Class <a href="Erubis/StdoutEruby.html" class="link">Erubis::StdoutEruby</a><br />
|
||||
Class <a href="Erubis/StdoutSimplifiedEruby.html" class="link">Erubis::StdoutSimplifiedEruby</a><br />
|
||||
Class <a href="Erubis/StringBufferEruby.html" class="link">Erubis::StringBufferEruby</a><br />
|
||||
Class <a href="Erubis/StringIOEruby.html" class="link">Erubis::StringIOEruby</a><br />
|
||||
Class <a href="Erubis/TinyEruby.html" class="link">Erubis::TinyEruby</a><br />
|
||||
Class <a href="Erubis/XmlEruby.html" class="link">Erubis::XmlEruby</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">EMPTY_BINDING</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">binding()</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Ejs</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">Ejavascript</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">EscapedEjs</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">EscapedEjavascript</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">VERSION</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">('$Release: 2.6.6 $' =~ /([.\d]+)/) && $1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,175 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::ArrayBufferEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ArrayBufferEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
use an Array object as buffer (included in <a href="Eruby.html">Eruby</a>
|
||||
by default)
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000010">add_postamble</a>
|
||||
<a href="#M000009">add_preamble</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000010" class="method-detail">
|
||||
<a name="M000010"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000010" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000010-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 191</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf.join\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000009" class="method-detail">
|
||||
<a name="M000009"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000009" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000009-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 187</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf = [];"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::ArrayBufferEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ArrayBufferEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="ArrayBufferEnhancer.html">ArrayBufferEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,174 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::ArrayEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ArrayEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
return array instead of string
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000194">add_postamble</a>
|
||||
<a href="#M000193">add_preamble</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000194" class="method-detail">
|
||||
<a name="M000194"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000194" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000194-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 168</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000193" class="method-detail">
|
||||
<a name="M000193"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000193" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000193-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 164</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf = [];"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::ArrayEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ArrayEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="ArrayEnhancer.html">ArrayEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,112 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Basic</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Basic</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="Basic/Converter.html" class="link">Erubis::Basic::Converter</a><br />
|
||||
Class <a href="Basic/Engine.html" class="link">Erubis::Basic::Engine</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,327 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Basic::Converter</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Basic::Converter</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
basic converter which supports ’<% … %>’ notation.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000141">add_expr</a>
|
||||
<a href="#M000140">convert_input</a>
|
||||
<a href="#M000138">init_converter</a>
|
||||
<a href="#M000139">pattern_regexp</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../Converter.html">Erubis::Converter</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DEFAULT_REGEXP</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">pattern_regexp('<% %>')</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
DEFAULT_REGEXP = /(.*?)(^[ \t]*)?<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
|
||||
DEFAULT_REGEXP = /(^[ \t]*)?<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
|
||||
DEFAULT_REGEXP = /<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">pattern</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">trim</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000141" class="method-detail">
|
||||
<a name="M000141"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000141" class="method-signature">
|
||||
<span class="method-name">add_expr</span><span class="method-args">(src, code, indicator)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
add expression code to src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000141-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 176</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">indicator</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
||||
<span class="ruby-ivar">@escape</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'=='</span>
|
||||
<span class="ruby-ivar">@escape</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'==='</span>
|
||||
<span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000140" class="method-detail">
|
||||
<a name="M000140"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000140" class="method-signature">
|
||||
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000140-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 127</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">pat</span> = <span class="ruby-ivar">@pattern</span>
|
||||
<span class="ruby-identifier">regexp</span> = <span class="ruby-identifier">pat</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">pat</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<% %>'</span> <span class="ruby-operator">?</span> <span class="ruby-constant">DEFAULT_REGEXP</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">pattern_regexp</span>(<span class="ruby-identifier">pat</span>)
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># is beginning of line</span>
|
||||
<span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">tailch</span>, <span class="ruby-identifier">rspace</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>()
|
||||
<span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
|
||||
<span class="ruby-identifier">text</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)
|
||||
<span class="ruby-identifier">ch</span> = <span class="ruby-identifier">indicator</span> <span class="ruby-value">? </span><span class="ruby-identifier">indicator</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?=</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">detect_spaces_at_bol</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">is_bol</span>)
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-identifier">rspace</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-comment cmt">## * when '<%= %>', do nothing</span>
|
||||
<span class="ruby-comment cmt">## * when '<% %>' or '<%# %>', delete spaces iff only spaces are around '<% %>'</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?=</span> <span class="ruby-comment cmt"># <%= %></span>
|
||||
<span class="ruby-identifier">rspace</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tailch</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tailch</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">lspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?\#</span> <span class="ruby-comment cmt"># <%# %></span>
|
||||
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">count</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-operator">+</span> (<span class="ruby-identifier">rspace</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">lspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?%</span> <span class="ruby-comment cmt"># <%% %></span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-node">"#{lspace}#{@prefix||='<%'}#{code}#{tailch}#{@postfix||='%>'}#{rspace}"</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">s</span>)
|
||||
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># <% %></span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-node">"#{lspace}#{code}#{rspace}"</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">lspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || input # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">input</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000138" class="method-detail">
|
||||
<a name="M000138"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000138" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000138-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 103</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-ivar">@pattern</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pattern</span>]
|
||||
<span class="ruby-ivar">@trim</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:trim</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000139" class="method-detail">
|
||||
<a name="M000139"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000139" class="method-signature">
|
||||
<span class="method-name">pattern_regexp</span><span class="method-args">(pattern)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
return regexp of pattern to parse eRuby script
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000139-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 112</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pattern_regexp</span>(<span class="ruby-identifier">pattern</span>)
|
||||
<span class="ruby-ivar">@prefix</span>, <span class="ruby-ivar">@postfix</span> = <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">split</span>() <span class="ruby-comment cmt"># '<% %>' => '<%', '%>'</span>
|
||||
<span class="ruby-comment cmt">#return /(.*?)(^[ \t]*)?#{@prefix}(=+|\#)?(.*?)-?#{@postfix}([ \t]*\r?\n)?/m</span>
|
||||
<span class="ruby-comment cmt">#return /(^[ \t]*)?#{@prefix}(=+|\#)?(.*?)-?#{@postfix}([ \t]*\r?\n)?/m</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">/#{@prefix}(=+|-|\#|%)?(.*?)([-=])?#{@postfix}([ \t]*\r?\n)?/</span><span class="ruby-identifier">m</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,130 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Basic::Engine</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Basic::Engine</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine_rb.html">
|
||||
erubis/engine.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Engine.html">
|
||||
Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
(abstract) base engine class for <a href="../Eruby.html">Eruby</a>, <a
|
||||
href="../Eperl.html">Eperl</a>, <a href="../Ejava.html">Ejava</a>, and so
|
||||
on. subclass must include generator.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../Evaluator.html">Evaluator</a></span>
|
||||
<span class="include-name"><a href="Converter.html">Basic::Converter</a></span>
|
||||
<span class="include-name"><a href="../Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,215 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::BiPatternEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::BiPatternEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
enable to use other embedded expression pattern (default is ’\[=
|
||||
=\]’).
|
||||
</p>
|
||||
<p>
|
||||
notice! this is an experimental. spec may change in the future.
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
input = <<END
|
||||
<% for item in list %>
|
||||
<%= item %> : <%== item %>
|
||||
[= item =] : [== item =]
|
||||
<% end %>
|
||||
END
|
||||
|
||||
class BiPatternEruby
|
||||
include BiPatternEnhancer
|
||||
end
|
||||
eruby = BiPatternEruby.new(input, :bipattern=>'\[= =\]')
|
||||
list = ['<a>', 'b&b', '"c"']
|
||||
print eruby.result(binding())
|
||||
|
||||
## output
|
||||
<a> : &lt;a&gt;
|
||||
<a> : &lt;a&gt;
|
||||
b&b : b&amp;b
|
||||
b&b : b&amp;b
|
||||
"c" : &quot;c&quot;
|
||||
"c" : &quot;c&quot;
|
||||
</pre>
|
||||
<p>
|
||||
this is language independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000150">add_text</a>
|
||||
<a href="#M000149">new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000149" class="method-detail">
|
||||
<a name="M000149"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000149" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(input, properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000149-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 408</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bipattern</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:bipattern</span>] <span class="ruby-comment cmt"># or '\$\{ \}'</span>
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000150" class="method-detail">
|
||||
<a name="M000150"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000150" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000150-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 420</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-identifier">m</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-ivar">@bipattern_regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">txt</span>, <span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">m</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">txt</span>)
|
||||
<span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-value str">'='</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || text # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">m</span> <span class="ruby-value">? </span><span class="ruby-identifier">text</span>[<span class="ruby-identifier">m</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)<span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">text</span> <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::BiPatternEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::BiPatternEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="BiPatternEnhancer.html">BiPatternEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,386 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::CGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::CGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ec_rb.html">
|
||||
erubis/engine/ec.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000136">add_expr_debug</a>
|
||||
<a href="#M000135">add_expr_escaped</a>
|
||||
<a href="#M000134">add_expr_literal</a>
|
||||
<a href="#M000137">add_postamble</a>
|
||||
<a href="#M000129">add_preamble</a>
|
||||
<a href="#M000133">add_stmt</a>
|
||||
<a href="#M000132">add_text</a>
|
||||
<a href="#M000130">escape_text</a>
|
||||
<a href="#M000131">escaped_expr</a>
|
||||
<a href="#M000128">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000136" class="method-detail">
|
||||
<a name="M000136"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000136" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000136-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A\".*?\"\s*,\s*(.*)/</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[%"]/</span>, <span class="ruby-value str">'\\\1'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" fprintf(stderr, \"*** debug: #{s}\" #{code});"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000135" class="method-detail">
|
||||
<a name="M000135"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000135" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000135-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 67</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' '</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000134" class="method-detail">
|
||||
<a name="M000134"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000134" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000134-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 62</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" fprintf(#{@out}, "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">');'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000137" class="method-detail">
|
||||
<a name="M000137"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000137" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000137-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 82</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-comment cmt"># empty</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000129" class="method-detail">
|
||||
<a name="M000129"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000129" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000129-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#line 1 \"#{self.filename}\"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">filename</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000133" class="method-detail">
|
||||
<a name="M000133"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000133" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000133-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000132" class="method-detail">
|
||||
<a name="M000132"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000132" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000132-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 44</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator">:</span> <span class="ruby-value str">' '</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"fputs("</span>
|
||||
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' '</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'"'</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">line</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">'"'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">", #{@out});"</span> <span class="ruby-comment cmt">#<< (text[-1] == ?\n ? "\n" : "")</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000130" class="method-detail">
|
||||
<a name="M000130"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000130" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000130-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 34</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-ivar">@@table_</span> <span class="ruby-operator">||=</span> { <span class="ruby-value str">"\r"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\r"</span>, <span class="ruby-value str">"\n"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\n"</span>, <span class="ruby-value str">"\t"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\t"</span>, <span class="ruby-value str">'"'</span>=<span class="ruby-operator">></span><span class="ruby-value str">'\\"'</span>, <span class="ruby-value str">"\\"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\\\"</span> }
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/[\r\n\t"\\]/</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@@table_</span>[<span class="ruby-identifier">m</span>] }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000131" class="method-detail">
|
||||
<a name="M000131"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000131" class="method-signature">
|
||||
<span class="method-name">escaped_expr</span><span class="method-args">(code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000131-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 40</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{@escapefunc}(#{code.strip}, #{@out})"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000128" class="method-detail">
|
||||
<a name="M000128"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000128" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000128-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 23</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">"escape"</span>
|
||||
<span class="ruby-ivar">@indent</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:indent</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
||||
<span class="ruby-ivar">@out</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:out</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'stdout'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,113 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::CommandOptionError</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::CommandOptionError</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/main_rb.html">
|
||||
erubis/main.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="ErubisError.html">
|
||||
ErubisError
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,344 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Context</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Context</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/context_rb.html">
|
||||
erubis/context.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
context object for Engine#evaluate
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
template = <<'END'
|
||||
Hello <%= @user %>!
|
||||
<% for item in @list %>
|
||||
- <%= item %>
|
||||
<% end %>
|
||||
END
|
||||
|
||||
context = Erubis::Context.new(:user=>'World', :list=>['a','b','c'])
|
||||
# or
|
||||
# context = Erubis::Context.new
|
||||
# context[:user] = 'World'
|
||||
# context[:list] = ['a', 'b', 'c']
|
||||
|
||||
eruby = Erubis::Eruby.new(template)
|
||||
print eruby.evaluate(context)
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000219">[]</a>
|
||||
<a href="#M000220">[]=</a>
|
||||
<a href="#M000222">each</a>
|
||||
<a href="#M000221">keys</a>
|
||||
<a href="#M000218">new</a>
|
||||
<a href="#M000223">to_hash</a>
|
||||
<a href="#M000224">update</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name">Enumerable</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000218" class="method-detail">
|
||||
<a name="M000218"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000218" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(hash=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000218-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 33</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000219" class="method-detail">
|
||||
<a name="M000219"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000219" class="method-signature">
|
||||
<span class="method-name">[]</span><span class="method-args">(key)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000219-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000219-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 39</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{key}"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000220" class="method-detail">
|
||||
<a name="M000220"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000220" class="method-signature">
|
||||
<span class="method-name">[]=</span><span class="method-args">(key, value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000220-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000220-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 43</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{key}"</span>, <span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000222" class="method-detail">
|
||||
<a name="M000222"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000222" class="method-signature">
|
||||
<span class="method-name">each</span><span class="method-args">() {|key, value| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000222-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 51</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>
|
||||
<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">name</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
||||
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">name</span>)
|
||||
<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000221" class="method-detail">
|
||||
<a name="M000221"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000221" class="method-signature">
|
||||
<span class="method-name">keys</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000221-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000221-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 47</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">name</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] }
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000223" class="method-detail">
|
||||
<a name="M000223"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000223" class="method-signature">
|
||||
<span class="method-name">to_hash</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000223-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 59</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hash</span>
|
||||
<span class="ruby-identifier">hash</span> = {}
|
||||
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>] }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hash</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000224" class="method-detail">
|
||||
<a name="M000224"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000224" class="method-signature">
|
||||
<span class="method-name">update</span><span class="method-args">(context_or_hash)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000224-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/context.rb, line 65</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">context_or_hash</span>)
|
||||
<span class="ruby-identifier">arg</span> = <span class="ruby-identifier">context_or_hash</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">varname</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">varname</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">varname</span>)
|
||||
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,283 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Converter</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Converter</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Converter.html#M000063">convert</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000063">convert</a>
|
||||
<a href="#M000065">convert_input</a>
|
||||
<a href="#M000064">detect_spaces_at_bol</a>
|
||||
<a href="#M000062">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">escape</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">postamble</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">preamble</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000063" class="method-detail">
|
||||
<a name="M000063"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000063" class="method-signature">
|
||||
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
<a href="Converter.html#M000063">convert</a> input string into target
|
||||
language
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000063-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 33</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">codebuf</span> = <span class="ruby-value str">""</span> <span class="ruby-comment cmt"># or []</span>
|
||||
<span class="ruby-ivar">@preamble</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">codebuf</span>) <span class="ruby-operator">:</span> (<span class="ruby-ivar">@preamble</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">codebuf</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@preamble</span>))
|
||||
<span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-ivar">@postamble</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">codebuf</span>) <span class="ruby-operator">:</span> (<span class="ruby-ivar">@postamble</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">codebuf</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@postamble</span>))
|
||||
<span class="ruby-ivar">@_proc</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># clear cached proc object</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">codebuf</span> <span class="ruby-comment cmt"># or codebuf.join()</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000062" class="method-detail">
|
||||
<a name="M000062"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000062" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000062-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 26</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@preamble</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:preamble</span>]
|
||||
<span class="ruby-ivar">@postamble</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:postamble</span>]
|
||||
<span class="ruby-ivar">@escape</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:escape</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000065" class="method-detail">
|
||||
<a name="M000065"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000065" class="method-signature">
|
||||
<span class="method-name">convert_input</span><span class="method-args">(codebuf, input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) <a href="Converter.html#M000063">convert</a> input to code
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000065-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 77</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000064" class="method-detail">
|
||||
<a name="M000064"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000064" class="method-signature">
|
||||
<span class="method-name">detect_spaces_at_bol</span><span class="method-args">(text, is_bol)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
detect spaces at beginning of line
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000064-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 47</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">detect_spaces_at_bol</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">is_bol</span>)
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-value str">""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_bol</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-value str">""</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">rindex</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value">?\n</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rindex</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">text</span>[<span class="ruby-identifier">rindex</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A[ \t]*\z/</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-identifier">s</span>
|
||||
<span class="ruby-comment cmt">#text = text[0..rindex]</span>
|
||||
<span class="ruby-identifier">text</span>[<span class="ruby-identifier">rindex</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_bol</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">text</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A[ \t]*\z/</span>
|
||||
<span class="ruby-comment cmt">#lspace = text</span>
|
||||
<span class="ruby-comment cmt">#text = nil</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">dup</span>
|
||||
<span class="ruby-identifier">text</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,150 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::DeleteIndentEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::DeleteIndentEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
delete indentation of HTML.
|
||||
</p>
|
||||
<p>
|
||||
this is language-independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000192">convert_input</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000192" class="method-detail">
|
||||
<a name="M000192"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000192" class="method-signature">
|
||||
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000192-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 578</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">input</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^[ \t]+</</span>, <span class="ruby-value str">'<'</span>)
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::DeleteIndentEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::DeleteIndentEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="DeleteIndentEnhancer.html">DeleteIndentEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
126
vendor/plugins/erubis/doc-api/classes/Erubis/Ec.html
vendored
126
vendor/plugins/erubis/doc-api/classes/Erubis/Ec.html
vendored
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Ec</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Ec</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ec_rb.html">
|
||||
erubis/engine/ec.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for C
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="CGenerator.html">CGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Ejava</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Ejava</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejava_rb.html">
|
||||
erubis/engine/ejava.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for Java
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="JavaGenerator.html">JavaGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Ejavascript</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Ejavascript</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejavascript_rb.html">
|
||||
erubis/engine/ejavascript.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for JavaScript
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="JavascriptGenerator.html">JavascriptGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,305 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Engine</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Engine</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine_rb.html">
|
||||
erubis/engine.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
(abstract) abstract engine class. subclass must include evaluator and
|
||||
converter module.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000210">convert!</a>
|
||||
<a href="#M000211">load_file</a>
|
||||
<a href="#M000209">new</a>
|
||||
<a href="#M000212">process</a>
|
||||
<a href="#M000213">process_proc</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000211" class="method-detail">
|
||||
<a name="M000211"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000211" class="method-signature">
|
||||
<span class="method-name">load_file</span><span class="method-args">(filename, properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
load file, write cache file, and return engine object. this method create
|
||||
code cache file automatically. cachefile name can be specified with
|
||||
properties[:cachename], or filname + ‘cache’ is used as
|
||||
default.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000211-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine.rb, line 48</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-identifier">cachename</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:cachename</span>] <span class="ruby-operator">||</span> (<span class="ruby-identifier">filename</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.cache'</span>)
|
||||
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:filename</span>] = <span class="ruby-identifier">filename</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">cachename</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-operator"><=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">cachename</span>)
|
||||
<span class="ruby-identifier">engine</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">cachename</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">input</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'rb'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span> }
|
||||
<span class="ruby-identifier">engine</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">cachename</span>, <span class="ruby-value str">'wb'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">flock</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">LOCK_EX</span>)
|
||||
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">flush</span>()
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span>.<span class="ruby-identifier">untaint</span> <span class="ruby-comment cmt"># ok?</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">engine</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000209" class="method-detail">
|
||||
<a name="M000209"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000209" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(input=nil, properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
include <a href="Evaluator.html">Evaluator</a> include <a
|
||||
href="Converter.html">Converter</a> include <a
|
||||
href="Generator.html">Generator</a>
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000209-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000209-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine.rb, line 25</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-comment cmt">#@input = input</span>
|
||||
<span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-identifier">init_evaluator</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-ivar">@src</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">input</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000210" class="method-detail">
|
||||
<a name="M000210"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000210" class="method-signature">
|
||||
<span class="method-name">convert!</span><span class="method-args">(input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert input string and set it to @src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000210-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine.rb, line 37</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert!</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-ivar">@src</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000212" class="method-detail">
|
||||
<a name="M000212"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000212" class="method-signature">
|
||||
<span class="method-name">process</span><span class="method-args">(input, context=nil, filename=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
helper method to convert and evaluate input text with context object.
|
||||
context may be Binding, Hash, or Object.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000212-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">filename</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'(erubis)'</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Binding</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">context</span>, <span class="ruby-identifier">filename</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">context</span> = <span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">filename</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000213" class="method-detail">
|
||||
<a name="M000213"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000213" class="method-signature">
|
||||
<span class="method-name">process_proc</span><span class="method-args">(proc_obj, context=nil, filename=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
helper method evaluate Proc object with contect object. context may be
|
||||
Binding, Hash, or Object.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000213-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine.rb, line 88</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_proc</span>(<span class="ruby-identifier">proc_obj</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Binding</span>)
|
||||
<span class="ruby-identifier">filename</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'(erubis)'</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">proc_obj</span>, <span class="ruby-identifier">context</span>, <span class="ruby-identifier">filename</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">context</span> = <span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">proc_obj</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Eperl</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Eperl</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eperl_rb.html">
|
||||
erubis/engine/eperl.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for Perl
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PerlGenerator.html">PerlGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Ephp</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Ephp</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ephp_rb.html">
|
||||
erubis/engine/ephp.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for PHP
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PhpGenerator.html">PhpGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,175 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::ErboutEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ErboutEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
set buffer variable name to ‘_erbout’ as well as
|
||||
‘_buf‘
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000176">add_postamble</a>
|
||||
<a href="#M000175">add_preamble</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000176" class="method-detail">
|
||||
<a name="M000176"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000176" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000176-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 260</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf.to_s\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000175" class="method-detail">
|
||||
<a name="M000175"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000175" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000175-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 256</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_erbout = _buf = '';"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::ErboutEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ErboutEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="ErboutEnhancer.html">ErboutEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::ErubisError</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::ErubisError</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/error_rb.html">
|
||||
erubis/error.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
StandardError
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
base error class
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,132 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Eruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Eruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for Ruby
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="RubyEvaluator.html">RubyEvaluator</a></span>
|
||||
<span class="include-name"><a href="RubyGenerator.html">RubyGenerator</a></span>
|
||||
<span class="include-name"><a href="ErboutEnhancer.html">ErboutEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::EscapeEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapeEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
switch ’<%= … %>’ to escaped and ’<%==
|
||||
… %>’ to unescaped
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
class XmlEruby < Eruby
|
||||
include EscapeEnhancer
|
||||
end
|
||||
</pre>
|
||||
<p>
|
||||
this is language-indenedent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000182">add_expr</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000182" class="method-detail">
|
||||
<a name="M000182"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000182" class="method-signature">
|
||||
<span class="method-name">add_expr</span><span class="method-args">(src, code, indicator)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000182-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 37</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">indicator</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
||||
<span class="ruby-ivar">@escape</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'=='</span>
|
||||
<span class="ruby-ivar">@escape</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'==='</span>
|
||||
<span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEc</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEc</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ec_rb.html">
|
||||
erubis/engine/ec.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Ec.html">
|
||||
Ec
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEjava</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEjava</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejava_rb.html">
|
||||
erubis/engine/ejava.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Ejava.html">
|
||||
Ejava
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEjavascript</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEjavascript</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejavascript_rb.html">
|
||||
erubis/engine/ejavascript.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Ejavascript.html">
|
||||
Ejavascript
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEperl</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEperl</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eperl_rb.html">
|
||||
erubis/engine/eperl.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eperl.html">
|
||||
Eperl
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEphp</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEphp</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ephp_rb.html">
|
||||
erubis/engine/ephp.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Ephp.html">
|
||||
Ephp
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,127 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
swtich ’<%= %>’ to escaped and ’<%==
|
||||
%>’ to not escaped
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::EscapedEscheme</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::EscapedEscheme</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/escheme_rb.html">
|
||||
erubis/engine/escheme.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Escheme.html">
|
||||
Escheme
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Escheme</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Escheme</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/escheme_rb.html">
|
||||
erubis/engine/escheme.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
engine for Scheme
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="SchemeGenerator.html">SchemeGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,212 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Evaluator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Evaluator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/evaluator_rb.html">
|
||||
erubis/evaluator.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Evaluator.html#M000148">evaluate</a> code
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000148">evaluate</a>
|
||||
<a href="#M000146">init_evaluator</a>
|
||||
<a href="#M000147">result</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">filename</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">src</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000148" class="method-detail">
|
||||
<a name="M000148"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000148" class="method-signature">
|
||||
<span class="method-name">evaluate</span><span class="method-args">(*args)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000148-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 34</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotSupportedError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"evaluation of code except Ruby is not supported."</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000146" class="method-detail">
|
||||
<a name="M000146"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000146" class="method-signature">
|
||||
<span class="method-name">init_evaluator</span><span class="method-args">(properties)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000146-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 26</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_evaluator</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:filename</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000147" class="method-detail">
|
||||
<a name="M000147"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000147" class="method-signature">
|
||||
<span class="method-name">result</span><span class="method-args">(*args)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000147-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotSupportedError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"evaluation of code except Ruby is not supported."</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,131 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::FastEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::FastEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
fast engine for Ruby
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="InterpolationEnhancer.html">InterpolationEnhancer</a></span>
|
||||
<span class="include-name"><a href="ErboutEnhancer.html">ErboutEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,416 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Generator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Generator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/generator_rb.html">
|
||||
erubis/generator.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
code generator, called by <a href="Converter.html">Converter</a> module
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000019">add_expr_debug</a>
|
||||
<a href="#M000018">add_expr_escaped</a>
|
||||
<a href="#M000017">add_expr_literal</a>
|
||||
<a href="#M000020">add_postamble</a>
|
||||
<a href="#M000014">add_preamble</a>
|
||||
<a href="#M000016">add_stmt</a>
|
||||
<a href="#M000015">add_text</a>
|
||||
<a href="#M000012">escape_text</a>
|
||||
<a href="#M000013">escaped_expr</a>
|
||||
<a href="#M000011">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">escapefunc</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000019" class="method-detail">
|
||||
<a name="M000019"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000019" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add expression code to src for debug. this is called by
|
||||
add_expr().
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000019-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000018" class="method-detail">
|
||||
<a name="M000018"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000018" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add escaped expression code to src. this is called by
|
||||
add_expr().
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000018-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 67</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000017" class="method-detail">
|
||||
<a name="M000017"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000017" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add expression literal code to src. this is called by
|
||||
add_expr().
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000017-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 62</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000020" class="method-detail">
|
||||
<a name="M000020"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000020" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add @postamble to src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000020-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 77</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000014" class="method-detail">
|
||||
<a name="M000014"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000014" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add @preamble to src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000014-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 47</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000016" class="method-detail">
|
||||
<a name="M000016"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000016" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add statement code to src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000016-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 57</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000015" class="method-detail">
|
||||
<a name="M000015"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000015" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) add text string to src
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000015-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 52</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000012" class="method-detail">
|
||||
<a name="M000012"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000012" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
(abstract) escape text string
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
def escape_text(text)
|
||||
return text.dump
|
||||
# or return "'" + text.gsub(/['\\]/, '\\\\\&') + "'"
|
||||
end
|
||||
</pre>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000012-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 36</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">not_implemented</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000013" class="method-detail">
|
||||
<a name="M000013"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000013" class="method-signature">
|
||||
<span class="method-name">escaped_expr</span><span class="method-args">(code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
return escaped expression code (ex. ‘h(…)’ or
|
||||
‘htmlspecialchars(…)’)
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000013-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 41</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{@escapefunc}(#{code})"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000011" class="method-detail">
|
||||
<a name="M000011"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000011" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000011-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/generator.rb, line 24</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@escapefunc</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:escapefunc</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,267 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::HeaderFooterEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::HeaderFooterEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<dl>
|
||||
<dt>experimental</dt><dd>allow header and footer in eRuby script
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
====================
|
||||
## without header and footer
|
||||
$ cat ex1.eruby
|
||||
<% def list_items(list) %>
|
||||
<% for item in list %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
$ erubis -s ex1.eruby
|
||||
_buf = []; def list_items(list)
|
||||
; for item in list
|
||||
; _buf << '<li>'; _buf << ( item ).to_s; _buf << '</li>
|
||||
'; end
|
||||
; end
|
||||
;
|
||||
_buf.join
|
||||
|
||||
## with header and footer
|
||||
$ cat ex2.eruby
|
||||
<!--#header:
|
||||
def list_items(list)
|
||||
#-->
|
||||
<% for item in list %>
|
||||
<li><%= item %></li>
|
||||
<% end %>
|
||||
<!--#footer:
|
||||
end
|
||||
#-->
|
||||
|
||||
$ erubis -s -c HeaderFooterEruby ex4.eruby
|
||||
|
||||
def list_items(list)
|
||||
_buf = []; _buf << '
|
||||
'; for item in list
|
||||
; _buf << '<li>'; _buf << ( item ).to_s; _buf << '</li>
|
||||
'; end
|
||||
; _buf << '
|
||||
';
|
||||
_buf.join
|
||||
end
|
||||
|
||||
====================
|
||||
</pre>
|
||||
<p>
|
||||
this is language-independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000109">add_text</a>
|
||||
<a href="#M000110">convert</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">HEADER_FOOTER_PATTERN</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">/(.*?)(^[ \t]*)?<!--\#(\w+):(.*?)\#-->([ \t]*\r?\n)?/m</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">footer</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">header</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000109" class="method-detail">
|
||||
<a name="M000109"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000109" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000109-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 541</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">m</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-constant">HEADER_FOOTER_PATTERN</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">txt</span>, <span class="ruby-identifier">lspace</span>, <span class="ruby-identifier">word</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">rspace</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">m</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>
|
||||
<span class="ruby-identifier">flag_trim</span> = <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">txt</span>)
|
||||
<span class="ruby-identifier">content</span> = <span class="ruby-node">"#{lspace}#{content}#{rspace}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flag_trim</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">lspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">flag_trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{word}"</span>, <span class="ruby-identifier">content</span>)
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">flag_trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || text # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">m</span> <span class="ruby-value">? </span><span class="ruby-identifier">text</span>[<span class="ruby-identifier">m</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)<span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">text</span> <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000110" class="method-detail">
|
||||
<a name="M000110"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000110" class="method-signature">
|
||||
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000110-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 559</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">source</span> = <span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@src</span> = <span class="ruby-node">"#{@header}#{source}#{@footer}"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::HeaderFooterEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::HeaderFooterEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="HeaderFooterEnhancer.html">HeaderFooterEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,116 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Helpers</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Helpers</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/helpers/rails_form_helper_rb.html">
|
||||
erubis/helpers/rails_form_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="Helpers/RailsFormHelper.html" class="link">Erubis::Helpers::RailsFormHelper</a><br />
|
||||
Module <a href="Helpers/RailsHelper.html" class="link">Erubis::Helpers::RailsHelper</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,787 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Helpers::RailsFormHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Helpers::RailsFormHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/helpers/rails_form_helper_rb.html">
|
||||
erubis/helpers/rails_form_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000092">_pp_check_box_checked?</a>
|
||||
<a href="#M000082">_pp_error_tags</a>
|
||||
<a href="#M000094">_pp_radio_button_checked?</a>
|
||||
<a href="#M000083">_pp_remove_error_div</a>
|
||||
<a href="#M000095">_pp_select</a>
|
||||
<a href="#M000096">_pp_select_options</a>
|
||||
<a href="#M000091">pp_check_box</a>
|
||||
<a href="#M000098">pp_collection_select</a>
|
||||
<a href="#M000099">pp_country_select</a>
|
||||
<a href="#M000081">pp_error_on</a>
|
||||
<a href="#M000089">pp_file_field</a>
|
||||
<a href="#M000085">pp_form_tag</a>
|
||||
<a href="#M000088">pp_hidden_field</a>
|
||||
<a href="#M000102">pp_image_submit_tag</a>
|
||||
<a href="#M000087">pp_password_field</a>
|
||||
<a href="#M000093">pp_radio_button</a>
|
||||
<a href="#M000080">pp_render_partial</a>
|
||||
<a href="#M000097">pp_select</a>
|
||||
<a href="#M000101">pp_submit_tag</a>
|
||||
<a href="#M000084">pp_tag_helper</a>
|
||||
<a href="#M000079">pp_template_filename</a>
|
||||
<a href="#M000078">pp_template_filename</a>
|
||||
<a href="#M000090">pp_text_area</a>
|
||||
<a href="#M000086">pp_text_field</a>
|
||||
<a href="#M000100">pp_time_zone_select</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000092" class="method-detail">
|
||||
<a name="M000092"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000092" class="method-signature">
|
||||
<span class="method-name">_pp_check_box_checked?</span><span class="method-args">(value, checked_value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000092-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 106</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_check_box_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">checked_value</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceTag</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_box_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">checked_value</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000082" class="method-detail">
|
||||
<a name="M000082"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000082" class="method-signature">
|
||||
<span class="method-name">_pp_error_tags</span><span class="method-args">(value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000082-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 46</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_error_tags</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">?</span> [<span class="ruby-value str">'<div class="fieldWithErrors">'</span>, <span class="ruby-value str">'</div>'</span>] <span class="ruby-operator">:</span> [<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000094" class="method-detail">
|
||||
<a name="M000094"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000094" class="method-signature">
|
||||
<span class="method-name">_pp_radio_button_checked?</span><span class="method-args">(value, tag_value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000094-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 117</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_radio_button_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">tag_value</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceTag</span><span class="ruby-operator">::</span><span class="ruby-identifier">radio_button_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">tag_value</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000083" class="method-detail">
|
||||
<a name="M000083"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000083" class="method-signature">
|
||||
<span class="method-name">_pp_remove_error_div</span><span class="method-args">(s)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000083-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 50</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>)
|
||||
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\A<div class="fieldWithErrors">(.*)<\/div>\z/</span>, <span class="ruby-value str">'\1'</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000095" class="method-detail">
|
||||
<a name="M000095"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000095" class="method-signature">
|
||||
<span class="method-name">_pp_select</span><span class="method-args">(object, method, collection, priority_collection, options={}, html_options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000095-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 121</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">priority_collection</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>) <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-value str">""</span>
|
||||
<span class="ruby-comment cmt">## start tag</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<select id=\"#{object}_#{method}\" name=\"#{object}[#{method}]\""</span>
|
||||
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">html_options</span><span class="ruby-operator">:</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" #{key}=\"#{val}\""</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">">\n"</span>
|
||||
<span class="ruby-comment cmt">## selected table</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:value</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">:value</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">'value'</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">nil?</span> ; <span class="ruby-identifier">selected</span> = <span class="ruby-node">"@#{object}.#{method}"</span>
|
||||
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">val</span>=<span class="ruby-identifier">options</span>[<span class="ruby-identifier">key</span>]).<span class="ruby-identifier">nil?</span> ; <span class="ruby-identifier">selected</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A<%=(.*)%>\z/</span> ; <span class="ruby-identifier">selected</span> = <span class="ruby-identifier">$1</span>
|
||||
<span class="ruby-keyword kw">else</span> ; <span class="ruby-identifier">selected</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">inspect</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<% _table = {#{selected}=>' selected=\"selected\"'} %>\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">selected</span>
|
||||
<span class="ruby-comment cmt">## <option> tags</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'include_blank'</span>]
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<option value=\"\"></option>\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">priority_collection</span>.<span class="ruby-identifier">blank?</span>
|
||||
<span class="ruby-identifier">_pp_select_options</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">priority_collection</span>, <span class="ruby-identifier">selected</span>, <span class="ruby-value str">'delete'</span>)
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<option value=\"\">-------------</option>\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">_pp_select_options</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">selected</span>, <span class="ruby-value str">'[]'</span>)
|
||||
<span class="ruby-comment cmt">## end tag</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</select>"</span>
|
||||
<span class="ruby-identifier">s</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000096" class="method-detail">
|
||||
<a name="M000096"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000096" class="method-signature">
|
||||
<span class="method-name">_pp_select_options</span><span class="method-args">(s, collection, selected, operator)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000096-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 153</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_select_options</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">selected</span>, <span class="ruby-identifier">operator</span>)
|
||||
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">item</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">collection</span>
|
||||
<span class="ruby-identifier">value</span>, <span class="ruby-identifier">text</span> = <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">:</span> [<span class="ruby-identifier">item</span>, <span class="ruby-identifier">item</span>]
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">selected</span>
|
||||
<span class="ruby-identifier">t</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">operator</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'delete'</span>
|
||||
<span class="ruby-identifier">t</span> = <span class="ruby-node">"<%= _table.delete(#{value.inspect}) %>"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">t</span> = <span class="ruby-node">"<%= _table[#{value.inspect}] %>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<option value=\"#{h value}\"#{t}>#{h text}</option>\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000091" class="method-detail">
|
||||
<a name="M000091"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000091" class="method-signature">
|
||||
<span class="method-name">pp_check_box</span><span class="method-args">(object_name, method, options={}, checked_value="1", unchecked_value="0")</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000091-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 99</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_check_box</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">checked_value</span>=<span class="ruby-value str">"1"</span>, <span class="ruby-identifier">unchecked_value</span>=<span class="ruby-value str">"0"</span>)
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">check_box</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">checked_value</span>, <span class="ruby-identifier">unchecked_value</span>)
|
||||
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\schecked=\"checked\"/</span>, <span class="ruby-value str">''</span>)
|
||||
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/type="checkbox"/</span>, <span class="ruby-node">"\\&<%= _pp_check_box_checked?(@#{object_name}.#{method}, #{checked_value.inspect}) ? ' checked=\"checked\"' : '' %>"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>) { <span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>) }
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000098" class="method-detail">
|
||||
<a name="M000098"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000098" class="method-signature">
|
||||
<span class="method-name">pp_collection_select</span><span class="method-args">(object, method, collection, value_method, text_method, options={}, html_options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000098-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 171</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_collection_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">value_method</span>, <span class="ruby-identifier">text_method</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
||||
<span class="ruby-identifier">collection2</span> = <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
||||
[<span class="ruby-identifier">e</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">value_method</span>), <span class="ruby-identifier">e</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">text_method</span>)]
|
||||
}
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection2</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000099" class="method-detail">
|
||||
<a name="M000099"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000099" class="method-signature">
|
||||
<span class="method-name">pp_country_select</span><span class="method-args">(object, method, priority_countries=nil, options={}, html_options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000099-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 178</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_country_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">priority_countries</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
||||
<span class="ruby-identifier">collection</span> = <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">FormOptionsHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">COUNTRIES</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">priority_countries</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000081" class="method-detail">
|
||||
<a name="M000081"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000081" class="method-signature">
|
||||
<span class="method-name">pp_error_on</span><span class="method-args">(object_name, method) {|object_name, method| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000081-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 37</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>)
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<% _stag, _etag = _pp_error_tags(@#{object_name}.errors.on('#{method}')) %>"</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%= _stag %>"</span>
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>)
|
||||
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%= _etag %>"</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000089" class="method-detail">
|
||||
<a name="M000089"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000089" class="method-signature">
|
||||
<span class="method-name">pp_file_field</span><span class="method-args">(object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000089-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 91</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_file_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:file_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000085" class="method-detail">
|
||||
<a name="M000085"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000085" class="method-signature">
|
||||
<span class="method-name">pp_form_tag</span><span class="method-args">(url_for_options={}, options={}, *parameters_for_url, &block)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000085-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 69</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_form_tag</span>(<span class="ruby-identifier">url_for_options</span>={}, <span class="ruby-identifier">options</span>={}, <span class="ruby-operator">*</span><span class="ruby-identifier">parameters_for_url</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">form_tag</span>(<span class="ruby-identifier">url_for_options</span>, <span class="ruby-identifier">options</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">parameters_for_url</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000088" class="method-detail">
|
||||
<a name="M000088"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000088" class="method-signature">
|
||||
<span class="method-name">pp_hidden_field</span><span class="method-args">(object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000088-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 87</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_hidden_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:hidden_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000102" class="method-detail">
|
||||
<a name="M000102"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000102" class="method-signature">
|
||||
<span class="method-name">pp_image_submit_tag</span><span class="method-args">(source, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000102-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 193</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_image_submit_tag</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">image_submit_tag</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000087" class="method-detail">
|
||||
<a name="M000087"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000087" class="method-signature">
|
||||
<span class="method-name">pp_password_field</span><span class="method-args">(object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000087-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 83</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_password_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:password_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000093" class="method-detail">
|
||||
<a name="M000093"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000093" class="method-signature">
|
||||
<span class="method-name">pp_radio_button</span><span class="method-args">(object_name, method, tag_value, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000093-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 110</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_radio_button</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">tag_value</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">radio_button</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">tag_value</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\schecked=\"checked\"/</span>, <span class="ruby-value str">''</span>)
|
||||
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/type="radio"/</span>, <span class="ruby-node">"\\&<%= _pp_radio_button_checked?(@#{object_name}.#{method}, #{tag_value.inspect}) ? ' checked=\"checked\"' : '' %>"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>) { <span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>) }
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000080" class="method-detail">
|
||||
<a name="M000080"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000080" class="method-signature">
|
||||
<span class="method-name">pp_render_partial</span><span class="method-args">(basename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000080-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_render_partial</span>(<span class="ruby-identifier">basename</span>)
|
||||
<span class="ruby-identifier">basename</span> = <span class="ruby-node">"_#{basename}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">basename</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?_</span>
|
||||
<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
||||
<span class="ruby-identifier">preprocessor</span> = <span class="ruby-identifier">_create_preprocessor</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">preprocessor</span>.<span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">_preprocessing_context_object</span>())
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000097" class="method-detail">
|
||||
<a name="M000097"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000097" class="method-signature">
|
||||
<span class="method-name">pp_select</span><span class="method-args">(object, method, collection, options={}, html_options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000097-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 167</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000101" class="method-detail">
|
||||
<a name="M000101"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000101" class="method-signature">
|
||||
<span class="method-name">pp_submit_tag</span><span class="method-args">(value="Save changes", options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000101-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 189</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_submit_tag</span>(<span class="ruby-identifier">value</span>=<span class="ruby-value str">"Save changes"</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">submit_tag</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000084" class="method-detail">
|
||||
<a name="M000084"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000084" class="method-signature">
|
||||
<span class="method-name">pp_tag_helper</span><span class="method-args">(helper, object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000084-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 55</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">helper</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object_name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">FormHelper</span>)
|
||||
<span class="ruby-identifier">object_name</span> = <span class="ruby-identifier">object_name</span>.<span class="ruby-identifier">object_name</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:value</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>)
|
||||
<span class="ruby-identifier">options</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">_?</span>(<span class="ruby-node">"h @#{object_name}.#{method}"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#$stderr.puts "*** debug: pp_tag_helper(): options=#{options.inspect}"</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>) {
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">helper</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>)
|
||||
}
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000079" class="method-detail">
|
||||
<a name="M000079"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000079" class="method-signature">
|
||||
<span class="method-name">pp_template_filename</span><span class="method-args">(basename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000079-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 23</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
||||
<span class="ruby-identifier">fname</span> = <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.html.erb"</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fname</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">fname</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.rhtml"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000078" class="method-detail">
|
||||
<a name="M000078"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000078" class="method-signature">
|
||||
<span class="method-name">pp_template_filename</span><span class="method-args">(basename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000078-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 19</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.rhtml"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000090" class="method-detail">
|
||||
<a name="M000090"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000090" class="method-signature">
|
||||
<span class="method-name">pp_text_area</span><span class="method-args">(object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000090-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 95</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_text_area</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:text_area</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000086" class="method-detail">
|
||||
<a name="M000086"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000086" class="method-signature">
|
||||
<span class="method-name">pp_text_field</span><span class="method-args">(object_name, method, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000086-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 79</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_text_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:text_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000100" class="method-detail">
|
||||
<a name="M000100"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000100" class="method-signature">
|
||||
<span class="method-name">pp_time_zone_select</span><span class="method-args">(object, method, priority_zones=nil, options={}, html_options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000100-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 183</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_time_zone_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">priority_zones</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
||||
<span class="ruby-identifier">model</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:model</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'model'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">TimeZone</span>
|
||||
<span class="ruby-identifier">collection</span> = <span class="ruby-identifier">model</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">e</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>] }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">priority_zones</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,349 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Helpers::RailsHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Helpers::RailsHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
helper module for Ruby on Rails
|
||||
</p>
|
||||
<p>
|
||||
howto:
|
||||
</p>
|
||||
<ol>
|
||||
<li>add the folliwng code in your ‘config/environment.rb‘
|
||||
|
||||
<pre>
|
||||
require 'erubis/helpers/rails_helper'
|
||||
#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby
|
||||
#Erubis::Helpers::RailsHelper.init_properties = {}
|
||||
#Erubis::Helpers::RailsHelper.show_src = false # set true for debugging
|
||||
#Erubis::Helpers::RailsHelper.preprocessing = true # set true to enable preprocessing
|
||||
</pre>
|
||||
</li>
|
||||
<li>restart web server.
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
if Erubis::Helper::Rails.show_src is true, <a
|
||||
href="../../Erubis.html">Erubis</a> prints converted Ruby code into log
|
||||
file (‘log/development.log’ or so). if false, it doesn‘t.
|
||||
if nil, <a href="../../Erubis.html">Erubis</a> prints converted Ruby code
|
||||
if ENV[‘RAILS_ENV’] == ‘development’.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000066">engine_class</a>
|
||||
<a href="#M000067">engine_class=</a>
|
||||
<a href="#M000068">init_properties</a>
|
||||
<a href="#M000069">init_properties=</a>
|
||||
<a href="#M000072">preprocessing</a>
|
||||
<a href="#M000073">preprocessing=</a>
|
||||
<a href="#M000070">show_src</a>
|
||||
<a href="#M000071">show_src=</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="RailsHelper/TemplateConverter.html" class="link">Erubis::Helpers::RailsHelper::TemplateConverter</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000066" class="method-detail">
|
||||
<a name="M000066"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000066" class="method-signature">
|
||||
<span class="method-name">engine_class</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
@@<a href="RailsHelper.html#M000066">engine_class</a> = ::<a
|
||||
href="../FastEruby.html">Erubis::FastEruby</a>
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000066-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 47</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">engine_class</span>
|
||||
<span class="ruby-ivar">@@engine_class</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000067" class="method-detail">
|
||||
<a name="M000067"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000067" class="method-signature">
|
||||
<span class="method-name">engine_class=</span><span class="method-args">(klass)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000067-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 50</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">engine_class=</span>(<span class="ruby-identifier">klass</span>)
|
||||
<span class="ruby-ivar">@@engine_class</span> = <span class="ruby-identifier">klass</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000068" class="method-detail">
|
||||
<a name="M000068"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000068" class="method-signature">
|
||||
<span class="method-name">init_properties</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000068-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 56</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_properties</span>
|
||||
<span class="ruby-ivar">@@init_properties</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000069" class="method-detail">
|
||||
<a name="M000069"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000069" class="method-signature">
|
||||
<span class="method-name">init_properties=</span><span class="method-args">(hash)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000069-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 59</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_properties=</span>(<span class="ruby-identifier">hash</span>)
|
||||
<span class="ruby-ivar">@@init_properties</span> = <span class="ruby-identifier">hash</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000072" class="method-detail">
|
||||
<a name="M000072"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000072" class="method-signature">
|
||||
<span class="method-name">preprocessing</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000072-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 74</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">preprocessing</span>
|
||||
<span class="ruby-ivar">@@preprocessing</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000073" class="method-detail">
|
||||
<a name="M000073"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000073" class="method-signature">
|
||||
<span class="method-name">preprocessing=</span><span class="method-args">(flag)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000073-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 77</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">preprocessing=</span>(<span class="ruby-identifier">flag</span>)
|
||||
<span class="ruby-ivar">@@preprocessing</span> = <span class="ruby-identifier">flag</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000070" class="method-detail">
|
||||
<a name="M000070"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000070" class="method-signature">
|
||||
<span class="method-name">show_src</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000070-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 65</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">show_src</span>
|
||||
<span class="ruby-ivar">@@show_src</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000071" class="method-detail">
|
||||
<a name="M000071"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000071" class="method-signature">
|
||||
<span class="method-name">show_src=</span><span class="method-args">(flag)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000071-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 68</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">show_src=</span>(<span class="ruby-identifier">flag</span>)
|
||||
<span class="ruby-ivar">@@show_src</span> = <span class="ruby-identifier">flag</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,213 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::Helpers::RailsHelper::TemplateConverter</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Helpers::RailsHelper::TemplateConverter</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../../files/erubis/helpers/rails_helper_rb.html">
|
||||
erubis/helpers/rails_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000074">_create_preprocessor</a>
|
||||
<a href="#M000076">_logger_info</a>
|
||||
<a href="#M000077">_logger_info</a>
|
||||
<a href="#M000075">_preprocessing_context_object</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000074" class="method-detail">
|
||||
<a name="M000074"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000074" class="method-signature">
|
||||
<span class="method-name">_create_preprocessor</span><span class="method-args">(template)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000074-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 107</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_create_preprocessor</span>(<span class="ruby-identifier">template</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">PreprocessingEruby</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">:escape=</span><span class="ruby-operator">></span><span class="ruby-keyword kw">true</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000076" class="method-detail">
|
||||
<a name="M000076"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000076" class="method-signature">
|
||||
<span class="method-name">_logger_info</span><span class="method-args">(message)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000076-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 113</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_logger_info</span>(<span class="ruby-identifier">message</span>)
|
||||
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000077" class="method-detail">
|
||||
<a name="M000077"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000077" class="method-signature">
|
||||
<span class="method-name">_logger_info</span><span class="method-args">(message)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000077-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 164</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_logger_info</span>(<span class="ruby-identifier">message</span>)
|
||||
<span class="ruby-comment cmt">#logger.info message # logger.info seems not available in Rails 2.2</span>
|
||||
<span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000075" class="method-detail">
|
||||
<a name="M000075"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000075" class="method-signature">
|
||||
<span class="method-name">_preprocessing_context_object</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000075-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 110</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_preprocessing_context_object</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,306 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::InterpolationEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::InterpolationEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
convert "<h1><%=title%></h1>" into "_buf
|
||||
<< %Q`<h1>#{title}</h1>`"
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000200">_add_text_to_str</a>
|
||||
<a href="#M000201">add_expr_escaped</a>
|
||||
<a href="#M000202">add_expr_literal</a>
|
||||
<a href="#M000199">add_text</a>
|
||||
<a href="#M000198">convert_input</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000200" class="method-detail">
|
||||
<a name="M000200"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000200" class="method-signature">
|
||||
<span class="method-name">_add_text_to_str</span><span class="method-args">(str, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000200-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 663</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_add_text_to_str</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/[`\#\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000201" class="method-detail">
|
||||
<a name="M000201"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000201" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(str, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000201-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 669</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\#{#{escaped_expr(code)}}"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000202" class="method-detail">
|
||||
<a name="M000202"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000202" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(str, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000202-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000202-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 673</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\#{#{code}}"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000199" class="method-detail">
|
||||
<a name="M000199"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000199" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000199-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 652</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-comment cmt">#src << " _buf << %Q`" << text << "`;"</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] = <span class="ruby-value str">"\\n"</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << %Q`"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">text</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"`\n"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << %Q`"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">text</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"`;"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000198" class="method-detail">
|
||||
<a name="M000198"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000198" class="method-signature">
|
||||
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000198-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 597</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">pat</span> = <span class="ruby-ivar">@pattern</span>
|
||||
<span class="ruby-identifier">regexp</span> = <span class="ruby-identifier">pat</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">pat</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<% %>'</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Basic</span><span class="ruby-operator">::</span><span class="ruby-constant">Converter</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_REGEXP</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">pattern_regexp</span>(<span class="ruby-identifier">pat</span>)
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># is beginning of line</span>
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">tailch</span>, <span class="ruby-identifier">rspace</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>()
|
||||
<span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
|
||||
<span class="ruby-identifier">text</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)
|
||||
<span class="ruby-identifier">ch</span> = <span class="ruby-identifier">indicator</span> <span class="ruby-value">? </span><span class="ruby-identifier">indicator</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?=</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">detect_spaces_at_bol</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">is_bol</span>)
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-identifier">rspace</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-identifier">_add_text_to_str</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-comment cmt">## * when '<%= %>', do nothing</span>
|
||||
<span class="ruby-comment cmt">## * when '<% %>' or '<%# %>', delete spaces iff only spaces are around '<% %>'</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?=</span> <span class="ruby-comment cmt"># <%= %></span>
|
||||
<span class="ruby-identifier">rspace</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tailch</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tailch</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">lspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?\#</span> <span class="ruby-comment cmt"># <%# %></span>
|
||||
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">count</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-operator">+</span> (<span class="ruby-identifier">rspace</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">lspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># <% %></span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-node">"#{lspace}#{code}#{rspace}"</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">lspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || input # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">input</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-identifier">_add_text_to_str</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::InterpolationEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::InterpolationEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="InterpolationEnhancer.html">InterpolationEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,359 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::JavaGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::JavaGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejava_rb.html">
|
||||
erubis/engine/ejava.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000190">add_expr_debug</a>
|
||||
<a href="#M000189">add_expr_escaped</a>
|
||||
<a href="#M000188">add_expr_literal</a>
|
||||
<a href="#M000191">add_postamble</a>
|
||||
<a href="#M000184">add_preamble</a>
|
||||
<a href="#M000187">add_stmt</a>
|
||||
<a href="#M000186">add_text</a>
|
||||
<a href="#M000185">escape_text</a>
|
||||
<a href="#M000183">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000190" class="method-detail">
|
||||
<a name="M000190"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000190" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000190-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 68</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" System.err.println(\"*** debug: #{code}=\"+(#{code}));"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000189" class="method-detail">
|
||||
<a name="M000189"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000189" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000189-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 64</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000188" class="method-detail">
|
||||
<a name="M000188"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000188" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000188-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000188-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" #{@buf}.append(#{code});"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000191" class="method-detail">
|
||||
<a name="M000191"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000191" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000191-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 74</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?;</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"return "</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@buf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".toString();\n"</span>
|
||||
<span class="ruby-comment cmt">#src << @indent << "System.out.print(" << @buf << ".toString());\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000184" class="method-detail">
|
||||
<a name="M000184"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000184" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000184-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000184-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 32</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@indent}#{@bufclass} #{@buf} = new #{@bufclass}();"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000187" class="method-detail">
|
||||
<a name="M000187"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000187" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000187-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 54</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000186" class="method-detail">
|
||||
<a name="M000186"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000186" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000186-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000186-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 41</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator">:</span> <span class="ruby-value str">' '</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@buf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".append("</span>
|
||||
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' + '</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'"'</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">line</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">'"'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">");"</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">""</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000185" class="method-detail">
|
||||
<a name="M000185"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000185" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000185-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000185-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 36</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-ivar">@@table_</span> <span class="ruby-operator">||=</span> { <span class="ruby-value str">"\r"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\r"</span>, <span class="ruby-value str">"\n"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\n"</span>, <span class="ruby-value str">"\t"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\t"</span>, <span class="ruby-value str">'"'</span>=<span class="ruby-operator">></span><span class="ruby-value str">'\\"'</span>, <span class="ruby-value str">"\\"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\\\"</span> }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/[\r\n\t"\\]/</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@@table_</span>[<span class="ruby-identifier">m</span>] } <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000183" class="method-detail">
|
||||
<a name="M000183"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000183" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000183-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 24</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'escape'</span>
|
||||
<span class="ruby-ivar">@indent</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:indent</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
||||
<span class="ruby-ivar">@buf</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:buf</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'_buf'</span>
|
||||
<span class="ruby-ivar">@bufclass</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:bufclass</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'StringBuffer'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,386 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::JavascriptGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::JavascriptGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ejavascript_rb.html">
|
||||
erubis/engine/ejavascript.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000171">add_expr_debug</a>
|
||||
<a href="#M000170">add_expr_escaped</a>
|
||||
<a href="#M000169">add_expr_literal</a>
|
||||
<a href="#M000166">add_indent</a>
|
||||
<a href="#M000172">add_postamble</a>
|
||||
<a href="#M000164">add_preamble</a>
|
||||
<a href="#M000168">add_stmt</a>
|
||||
<a href="#M000167">add_text</a>
|
||||
<a href="#M000165">escape_text</a>
|
||||
<a href="#M000163">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000171" class="method-detail">
|
||||
<a name="M000171"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000171" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000171-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_indent</span>(<span class="ruby-identifier">src</span>, <span class="ruby-ivar">@indent</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"alert(\"*** debug: #{code}=\"+(#{code}));"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000170" class="method-detail">
|
||||
<a name="M000170"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000170" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000170-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 68</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000169" class="method-detail">
|
||||
<a name="M000169"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000169" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000169-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 62</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_indent</span>(<span class="ruby-identifier">src</span>, <span class="ruby-ivar">@indent</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@buf}.push(#{code});"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000166" class="method-detail">
|
||||
<a name="M000166"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000166" class="method-signature">
|
||||
<span class="method-name">add_indent</span><span class="method-args">(src, indent)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000166-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 41</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_indent</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">indent</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">src</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">indent</span> <span class="ruby-operator">:</span> <span class="ruby-value str">' '</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000172" class="method-detail">
|
||||
<a name="M000172"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000172" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000172-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 78</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?;</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@docwrite</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'document.write('</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@buf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".join(\"\"));\n"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@indent</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@buf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".join(\"\");\n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000164" class="method-detail">
|
||||
<a name="M000164"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000164" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000164-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 32</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@indent}var #{@buf} = [];"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000168" class="method-detail">
|
||||
<a name="M000168"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000168" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000168-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000167" class="method-detail">
|
||||
<a name="M000167"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000167" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000167-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 45</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">add_indent</span>(<span class="ruby-identifier">src</span>, <span class="ruby-ivar">@indent</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@buf</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'.push("'</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">s</span>[<span class="ruby-value">-2</span>, <span class="ruby-value">2</span>] = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\");\n"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\");"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000165" class="method-detail">
|
||||
<a name="M000165"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000165" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000165-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 36</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-ivar">@@table_</span> <span class="ruby-operator">||=</span> { <span class="ruby-value str">"\r"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\r"</span>, <span class="ruby-value str">"\n"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\n\\\n"</span>, <span class="ruby-value str">"\t"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\t"</span>, <span class="ruby-value str">'"'</span>=<span class="ruby-operator">></span><span class="ruby-value str">'\\"'</span>, <span class="ruby-value str">"\\"</span>=<span class="ruby-operator">></span><span class="ruby-value str">"\\\\"</span> }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/[\r\n\t"\\]/</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@@table_</span>[<span class="ruby-identifier">m</span>] } <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000163" class="method-detail">
|
||||
<a name="M000163"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000163" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000163-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 24</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'escape'</span>
|
||||
<span class="ruby-ivar">@indent</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:indent</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
||||
<span class="ruby-ivar">@buf</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:out</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'_buf'</span>
|
||||
<span class="ruby-ivar">@docwrite</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:docwrite</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># '!= false' will be removed in the next release</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,341 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::Main</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::Main</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/main_rb.html">
|
||||
erubis/main.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Main.html#M000215">main</a> class of command
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
Main.main(ARGV)
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000217">execute</a>
|
||||
<a href="#M000215">main</a>
|
||||
<a href="#M000216">new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000215" class="method-detail">
|
||||
<a name="M000215"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000215" class="method-signature">
|
||||
<span class="method-name">main</span><span class="method-args">(argv=ARGV)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000215-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/main.rb, line 39</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">main</span>(<span class="ruby-identifier">argv</span>=<span class="ruby-constant">ARGV</span>)
|
||||
<span class="ruby-identifier">status</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-keyword kw">begin</span>
|
||||
<span class="ruby-constant">Main</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-constant">ARGV</span>)
|
||||
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">CommandOptionError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
||||
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>
|
||||
<span class="ruby-identifier">status</span> = <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">exit</span>(<span class="ruby-identifier">status</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000216" class="method-detail">
|
||||
<a name="M000216"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000216" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000216-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/main.rb, line 50</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
||||
<span class="ruby-ivar">@single_options</span> = <span class="ruby-value str">"hvxztTSbeBXNUC"</span>
|
||||
<span class="ruby-ivar">@arg_options</span> = <span class="ruby-value str">"pcrfKIlaE"</span> <span class="ruby-comment cmt">#C</span>
|
||||
<span class="ruby-ivar">@option_names</span> = {
|
||||
<span class="ruby-value str">'h'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:help</span>,
|
||||
<span class="ruby-value str">'v'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:version</span>,
|
||||
<span class="ruby-value str">'x'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:source</span>,
|
||||
<span class="ruby-value str">'z'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:syntax</span>,
|
||||
<span class="ruby-value str">'T'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:unexpand</span>,
|
||||
<span class="ruby-value str">'t'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:untabify</span>, <span class="ruby-comment cmt"># obsolete</span>
|
||||
<span class="ruby-value str">'S'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:intern</span>,
|
||||
<span class="ruby-value str">'b'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:bodyonly</span>,
|
||||
<span class="ruby-value str">'B'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:binding</span>,
|
||||
<span class="ruby-value str">'p'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:pattern</span>,
|
||||
<span class="ruby-value str">'c'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:context</span>,
|
||||
<span class="ruby-comment cmt">#'C' => :class,</span>
|
||||
<span class="ruby-value str">'e'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:escape</span>,
|
||||
<span class="ruby-value str">'r'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:requires</span>,
|
||||
<span class="ruby-value str">'f'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:datafiles</span>,
|
||||
<span class="ruby-value str">'K'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:kanji</span>,
|
||||
<span class="ruby-value str">'I'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:includes</span>,
|
||||
<span class="ruby-value str">'l'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:lang</span>,
|
||||
<span class="ruby-value str">'a'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:action</span>,
|
||||
<span class="ruby-value str">'E'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:enhancers</span>,
|
||||
<span class="ruby-value str">'X'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:notext</span>,
|
||||
<span class="ruby-value str">'N'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:linenum</span>,
|
||||
<span class="ruby-value str">'U'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:unique</span>,
|
||||
<span class="ruby-value str">'C'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:compact</span>,
|
||||
}
|
||||
<span class="ruby-identifier">assert</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@single_options</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@arg_options</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@option_names</span>.<span class="ruby-identifier">length</span>
|
||||
(<span class="ruby-ivar">@single_options</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@arg_options</span>).<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">assert</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@option_names</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">ch</span>.<span class="ruby-identifier">chr</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000217" class="method-detail">
|
||||
<a name="M000217"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000217" class="method-signature">
|
||||
<span class="method-name">execute</span><span class="method-args">(argv=ARGV)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000217-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/main.rb, line 86</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute</span>(<span class="ruby-identifier">argv</span>=<span class="ruby-constant">ARGV</span>)
|
||||
<span class="ruby-comment cmt">## parse command-line options</span>
|
||||
<span class="ruby-identifier">options</span>, <span class="ruby-identifier">properties</span> = <span class="ruby-identifier">parse_argv</span>(<span class="ruby-identifier">argv</span>, <span class="ruby-ivar">@single_options</span>, <span class="ruby-ivar">@arg_options</span>)
|
||||
<span class="ruby-identifier">filenames</span> = <span class="ruby-identifier">argv</span>
|
||||
<span class="ruby-identifier">options</span>[<span class="ruby-value str">'h'</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:help</span>]
|
||||
<span class="ruby-identifier">opts</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">arr</span> = <span class="ruby-ivar">@option_names</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-node">"def #{name}; @#{name}; end\n"</span> }
|
||||
<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">join</span>
|
||||
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">name</span> = <span class="ruby-ivar">@option_names</span>[<span class="ruby-identifier">ch</span>]
|
||||
<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{name}"</span>, <span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-comment cmt">## help, version, enhancer list</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">help</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">version</span>
|
||||
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">version</span>() <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">version</span>
|
||||
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">usage</span>() <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">help</span>
|
||||
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">show_properties</span>() <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">help</span>
|
||||
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">show_enhancers</span>() <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">help</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-comment cmt">## include path</span>
|
||||
<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">includes</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">$:</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">path</span>
|
||||
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">includes</span>
|
||||
|
||||
<span class="ruby-comment cmt">## require library</span>
|
||||
<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">requires</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">library</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">require</span> <span class="ruby-identifier">library</span>
|
||||
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">requires</span>
|
||||
|
||||
<span class="ruby-comment cmt">## action</span>
|
||||
<span class="ruby-identifier">action</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">action</span>
|
||||
<span class="ruby-identifier">action</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'syntax'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">syntax</span>
|
||||
<span class="ruby-identifier">action</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'convert'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">notext</span>
|
||||
|
||||
<span class="ruby-comment cmt">## lang</span>
|
||||
<span class="ruby-identifier">lang</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">lang</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'ruby'</span>
|
||||
<span class="ruby-identifier">action</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'convert'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">lang</span>
|
||||
|
||||
<span class="ruby-comment cmt">## class name of Eruby</span>
|
||||
<span class="ruby-comment cmt">#classname = opts.class</span>
|
||||
<span class="ruby-identifier">classname</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">klass</span> = <span class="ruby-identifier">get_classobj</span>(<span class="ruby-identifier">classname</span>, <span class="ruby-identifier">lang</span>, <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pi</span>])
|
||||
|
||||
<span class="ruby-comment cmt">## kanji code</span>
|
||||
<span class="ruby-identifier">$KCODE</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">kanji</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">kanji</span>
|
||||
|
||||
<span class="ruby-comment cmt">## read context values from yaml file</span>
|
||||
<span class="ruby-identifier">datafiles</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">datafiles</span>
|
||||
<span class="ruby-identifier">context</span> = <span class="ruby-identifier">load_datafiles</span>(<span class="ruby-identifier">datafiles</span>, <span class="ruby-identifier">opts</span>)
|
||||
|
||||
<span class="ruby-comment cmt">## parse context data</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">context</span>
|
||||
<span class="ruby-identifier">context</span> = <span class="ruby-identifier">parse_context_data</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">context</span>, <span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-comment cmt">## properties for engine</span>
|
||||
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:escape</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">escape</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">properties</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:escape</span>)
|
||||
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pattern</span>] = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">pattern</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">pattern</span>
|
||||
<span class="ruby-comment cmt">#properties[:trim] = false if opts.notrim</span>
|
||||
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:preamble</span>] = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:postamble</span>] = <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">bodyonly</span>
|
||||
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pi</span>] = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pi</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
||||
|
||||
<span class="ruby-comment cmt">## create engine and extend enhancers</span>
|
||||
<span class="ruby-identifier">engine</span> = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-identifier">enhancers</span> = <span class="ruby-identifier">get_enhancers</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">enhancers</span>)
|
||||
<span class="ruby-comment cmt">#enhancers.push(Erubis::EscapeEnhancer) if opts.escape</span>
|
||||
<span class="ruby-identifier">enhancers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">enhancer</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">enhancer</span>)
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">bipattern</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:bipattern</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">enhancer</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Erubis</span><span class="ruby-operator">::</span><span class="ruby-constant">BiPatternEnhancer</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-comment cmt">## no-text</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">Erubis</span><span class="ruby-operator">::</span><span class="ruby-constant">NoTextEnhancer</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">notext</span>
|
||||
|
||||
<span class="ruby-comment cmt">## convert and execute</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">msg</span> = <span class="ruby-value str">"Syntax OK\n"</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filenames</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">filenames</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">filenames</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">or</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CommandOptionError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{filename}: file not found."</span>)
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">filename</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">convert!</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">do_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">engine</span>, <span class="ruby-identifier">context</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-identifier">msg</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">filename</span> = <span class="ruby-value str">'(stdin)'</span>
|
||||
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">convert!</span>(<span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">read</span>())
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">do_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">engine</span>, <span class="ruby-identifier">context</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-identifier">msg</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">print</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'syntax'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">msg</span>
|
||||
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,249 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::NoCodeEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::NoCodeEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
remove code and leave text, especially useful when validating HTML tags.
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
$ erubis -s -E NoCode file.eruby | tidy -errors
|
||||
</pre>
|
||||
<p>
|
||||
this is language independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000007">add_expr</a>
|
||||
<a href="#M000005">add_postamble</a>
|
||||
<a href="#M000004">add_preamble</a>
|
||||
<a href="#M000008">add_stmt</a>
|
||||
<a href="#M000006">add_text</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000007" class="method-signature">
|
||||
<span class="method-name">add_expr</span><span class="method-args">(src, code, indicator)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000007-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 317</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">count</span>(<span class="ruby-value str">"\n"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000005" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000005-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 310</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000004" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000004-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 307</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000008" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000008-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 321</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">count</span>(<span class="ruby-value str">"\n"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000006" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000006-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 313</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::NoCodeEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::NoCodeEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="NoCodeEnhancer.html">NoCodeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,159 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::NoTextEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::NoTextEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
remove text and leave code, especially useful when debugging.
|
||||
</p>
|
||||
<p>
|
||||
ex.
|
||||
</p>
|
||||
<pre>
|
||||
$ erubis -s -E NoText file.eruby | more
|
||||
</pre>
|
||||
<p>
|
||||
this is language independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000174">add_text</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000174" class="method-detail">
|
||||
<a name="M000174"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000174" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000174-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 282</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> (<span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">count</span>(<span class="ruby-value str">"\n"</span>))
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">text</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(.*?)\z/</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> (<span class="ruby-value str">' '</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::NoTextEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::NoTextEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="NoTextEnhancer.html">NoTextEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,119 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::NotSupportedError</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::NotSupportedError</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/error_rb.html">
|
||||
erubis/error.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="ErubisError.html">
|
||||
ErubisError
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
raised when method or function is not supported
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,163 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::OptimizedEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::OptimizedEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/optimized_rb.html">
|
||||
erubis/engine/optimized.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Basic/Engine.html">
|
||||
Basic::Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Eruby.html">Eruby</a> class which generates optimized ruby code
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000214">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="RubyEvaluator.html">RubyEvaluator</a></span>
|
||||
<span class="include-name"><a href="OptimizedGenerator.html">OptimizedGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000214" class="method-detail">
|
||||
<a name="M000214"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000214" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000214-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000214-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 106</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'rb'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,439 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::OptimizedGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::OptimizedGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/optimized_rb.html">
|
||||
erubis/engine/optimized.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000033">add_expr_debug</a>
|
||||
<a href="#M000032">add_expr_escaped</a>
|
||||
<a href="#M000031">add_expr_literal</a>
|
||||
<a href="#M000034">add_postamble</a>
|
||||
<a href="#M000028">add_preamble</a>
|
||||
<a href="#M000030">add_stmt</a>
|
||||
<a href="#M000029">add_text</a>
|
||||
<a href="#M000024">escape_text</a>
|
||||
<a href="#M000025">escaped_expr</a>
|
||||
<a href="#M000023">init_generator</a>
|
||||
<a href="#M000026">switch_to_expr</a>
|
||||
<a href="#M000027">switch_to_stmt</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000023" class="method-detail">
|
||||
<a name="M000023"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000023" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000023-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 20</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">"Erubis::XmlHelper.escape_xml"</span>
|
||||
<span class="ruby-ivar">@initialized</span> = <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-ivar">@prev_is_expr</span> = <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000033" class="method-detail">
|
||||
<a name="M000033"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000033" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000033-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 85</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">s</span> = (<span class="ruby-identifier">code</span>.<span class="ruby-identifier">dump</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A"(.*)"\z/</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">$1</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' $stderr.puts("*** debug: '</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'=#{('</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">').inspect}");'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000032" class="method-detail">
|
||||
<a name="M000032"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000032" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000032-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 79</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@initialized</span>; <span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf = ''"</span>; <span class="ruby-ivar">@initialized</span> = <span class="ruby-keyword kw">true</span>; <span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">switch_to_expr</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" << "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000031" class="method-detail">
|
||||
<a name="M000031"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000031" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000031-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 73</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@initialized</span>; <span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf = ''"</span>; <span class="ruby-ivar">@initialized</span> = <span class="ruby-keyword kw">true</span>; <span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">switch_to_expr</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" << ("</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">").to_s"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000034" class="method-detail">
|
||||
<a name="M000034"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000034" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000034-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 91</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-comment cmt">#super if @initialized</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n_buf\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@initialized</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000028" class="method-detail">
|
||||
<a name="M000028"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000028" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000028-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 50</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-comment cmt">#@initialized = false</span>
|
||||
<span class="ruby-comment cmt">#@prev_is_expr = false</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000030" class="method-detail">
|
||||
<a name="M000030"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000030" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000030-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 66</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">switch_to_stmt</span>(<span class="ruby-identifier">src</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@initialized</span>
|
||||
<span class="ruby-comment cmt">#super</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">code</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000029" class="method-detail">
|
||||
<a name="M000029"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000029" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000029-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 55</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@initialized</span>
|
||||
<span class="ruby-identifier">switch_to_expr</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"'"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"_buf = '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span>
|
||||
<span class="ruby-ivar">@initialized</span> = <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000024" class="method-detail">
|
||||
<a name="M000024"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000024" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000024-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 29</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>) <span class="ruby-comment cmt"># "'" => "\\'", '\\' => '\\\\'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000025" class="method-detail">
|
||||
<a name="M000025"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000025" class="method-signature">
|
||||
<span class="method-name">escaped_expr</span><span class="method-args">(code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000025-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 33</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'Erubis::XmlHelper.escape_xml'</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{@escapefunc}(#{code})"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000026" class="method-detail">
|
||||
<a name="M000026"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000026" class="method-signature">
|
||||
<span class="method-name">switch_to_expr</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000026-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 38</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">switch_to_expr</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@prev_is_expr</span>
|
||||
<span class="ruby-ivar">@prev_is_expr</span> = <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' _buf'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000027" class="method-detail">
|
||||
<a name="M000027"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000027" class="method-signature">
|
||||
<span class="method-name">switch_to_stmt</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000027-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 44</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">switch_to_stmt</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@prev_is_expr</span>
|
||||
<span class="ruby-ivar">@prev_is_expr</span> = <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,163 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::OptimizedXmlEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::OptimizedXmlEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/optimized_rb.html">
|
||||
erubis/engine/optimized.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="OptimizedEruby.html">
|
||||
OptimizedEruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="XmlEruby.html">XmlEruby</a> class which generates optimized ruby
|
||||
code
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000225">add_expr_debug</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="EscapeEnhancer.html">EscapeEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000225" class="method-detail">
|
||||
<a name="M000225"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000225" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000225-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/optimized.rb, line 120</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">switch_to_stmt</span>(<span class="ruby-identifier">src</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">indicator</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'==='</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@initialized</span>
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
124
vendor/plugins/erubis/doc-api/classes/Erubis/PI.html
vendored
124
vendor/plugins/erubis/doc-api/classes/Erubis/PI.html
vendored
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PI</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/erubis/tiny_rb.html">
|
||||
erubis/tiny.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="PI/Converter.html" class="link">Erubis::PI::Converter</a><br />
|
||||
Class <a href="PI/Ec.html" class="link">Erubis::PI::Ec</a><br />
|
||||
Class <a href="PI/Ejava.html" class="link">Erubis::PI::Ejava</a><br />
|
||||
Class <a href="PI/Ejavascript.html" class="link">Erubis::PI::Ejavascript</a><br />
|
||||
Class <a href="PI/Engine.html" class="link">Erubis::PI::Engine</a><br />
|
||||
Class <a href="PI/Eperl.html" class="link">Erubis::PI::Eperl</a><br />
|
||||
Class <a href="PI/Ephp.html" class="link">Erubis::PI::Ephp</a><br />
|
||||
Class <a href="PI/Eruby.html" class="link">Erubis::PI::Eruby</a><br />
|
||||
Class <a href="PI/Escheme.html" class="link">Erubis::PI::Escheme</a><br />
|
||||
Class <a href="PI/TinyEruby.html" class="link">Erubis::PI::TinyEruby</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,266 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PI::Converter</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Converter</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/converter_rb.html">
|
||||
erubis/converter.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Processing Instructions (<a href="../PI.html">PI</a>) converter for XML.
|
||||
this class converts ’<?rb … ?>’ and
|
||||
’${…}’ notation.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000046">convert</a>
|
||||
<a href="#M000047">convert_input</a>
|
||||
<a href="#M000045">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../Converter.html">Erubis::Converter</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">pi</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">prefix</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000046" class="method-detail">
|
||||
<a name="M000046"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000046" class="method-signature">
|
||||
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000046-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 224</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">code</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@header</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@footer</span> <span class="ruby-operator">?</span> <span class="ruby-node">"#{@header}#{code}#{@footer}"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000045" class="method-detail">
|
||||
<a name="M000045"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000045" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000045-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 215</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-ivar">@trim</span> = <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">:trim</span>, <span class="ruby-keyword kw">true</span>)
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pi</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pi</span>]
|
||||
<span class="ruby-ivar">@embchar</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:embchar</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'@'</span>
|
||||
<span class="ruby-ivar">@pattern</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:pattern</span>]
|
||||
<span class="ruby-ivar">@pattern</span> = <span class="ruby-value str">'<% %>'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pattern</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment cmt">#|| @pattern == true</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000047" class="method-detail">
|
||||
<a name="M000047"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000047" class="method-signature">
|
||||
<span class="method-name">convert_input</span><span class="method-args">(codebuf, input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000047-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/converter.rb, line 231</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@regexp</span>
|
||||
<span class="ruby-ivar">@pi</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'e'</span>
|
||||
<span class="ruby-identifier">ch</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-ivar">@embchar</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pattern</span>
|
||||
<span class="ruby-identifier">left</span>, <span class="ruby-identifier">right</span> = <span class="ruby-ivar">@pattern</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">' '</span>)
|
||||
<span class="ruby-ivar">@regexp</span> = <span class="ruby-node">/<\?#{@pi}(?:-(\w+))?(\s.*?)\?>([ \t]*\r?\n)?|#{ch}(!*)?\{(.*?)\}#{ch}|#{left}(=+)(.*?)#{right}/</span><span class="ruby-identifier">m</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-ivar">@regexp</span> = <span class="ruby-node">/<\?#{@pi}(?:-(\w+))?(\s.*?)\?>([ \t]*\r?\n)?|#{ch}(!*)?\{(.*?)\}#{ch}/</span><span class="ruby-identifier">m</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#</span>
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-ivar">@regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pi_arg</span>, <span class="ruby-identifier">stmt</span>, <span class="ruby-identifier">rspace</span>,
|
||||
<span class="ruby-identifier">indicator1</span>, <span class="ruby-identifier">expr1</span>, <span class="ruby-identifier">indicator2</span>, <span class="ruby-identifier">expr2</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>
|
||||
<span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
|
||||
<span class="ruby-identifier">text</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)
|
||||
<span class="ruby-identifier">lspace</span> = <span class="ruby-identifier">stmt</span> <span class="ruby-value">? </span><span class="ruby-identifier">detect_spaces_at_bol</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">is_bol</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">is_bol</span> = <span class="ruby-identifier">stmt</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">text</span>) <span class="ruby-comment cmt"># unless text.empty?</span>
|
||||
<span class="ruby-comment cmt">#</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stmt</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trim</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">add_pi_stmt</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-node">"#{lspace}#{stmt}#{rspace}"</span>, <span class="ruby-identifier">pi_arg</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">lspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">add_pi_stmt</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">stmt</span>, <span class="ruby-identifier">pi_arg</span>)
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">rspace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">add_pi_expr</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">expr1</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">expr2</span>, <span class="ruby-identifier">indicator1</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">indicator2</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || input # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">input</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Ec</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Ec</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/ec_rb.html">
|
||||
erubis/engine/ec.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEc < <a href="Ec.html">Ec</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000055">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../CGenerator.html">CGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000055" class="method-detail">
|
||||
<a name="M000055"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000055" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000055-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ec.rb, line 109</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'c'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Ejava</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Ejava</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/ejava_rb.html">
|
||||
erubis/engine/ejava.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEjava < <a href="Ejava.html">Ejava</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000049">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../JavaGenerator.html">JavaGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000049" class="method-detail">
|
||||
<a name="M000049"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000049" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000049-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejava.rb, line 103</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'java'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Ejavascript</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Ejavascript</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/ejavascript_rb.html">
|
||||
erubis/engine/ejavascript.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEjavascript < <a href="Ejavascript.html">Ejavascript</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000056">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../JavascriptGenerator.html">JavascriptGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000056" class="method-detail">
|
||||
<a name="M000056"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000056" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000056-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ejavascript.rb, line 111</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'js'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,122 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Engine</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Engine</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine_rb.html">
|
||||
erubis/engine.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Engine.html">
|
||||
Engine
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../Evaluator.html">Evaluator</a></span>
|
||||
<span class="include-name"><a href="Converter.html">PI::Converter</a></span>
|
||||
<span class="include-name"><a href="../Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Eperl</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Eperl</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/eperl_rb.html">
|
||||
erubis/engine/eperl.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEperl < <a href="Eperl.html">Eperl</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000054">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../PerlGenerator.html">PerlGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000054" class="method-detail">
|
||||
<a name="M000054"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000054" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000054-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 87</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'perl'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Ephp</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Ephp</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/ephp_rb.html">
|
||||
erubis/engine/ephp.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEphp < <a href="Ephp.html">Ephp</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000058">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../PhpGenerator.html">PhpGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000058" class="method-detail">
|
||||
<a name="M000058"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000058" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000058-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 91</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'php'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,155 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Eruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Eruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000048">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../RubyEvaluator.html">RubyEvaluator</a></span>
|
||||
<span class="include-name"><a href="../RubyGenerator.html">RubyGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000048" class="method-detail">
|
||||
<a name="M000048"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000048" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000048-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 116</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'rb'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::Escheme</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::Escheme</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/engine/escheme_rb.html">
|
||||
erubis/engine/escheme.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
PI::Engine
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
class XmlEscheme < <a href="Escheme.html">Escheme</a>
|
||||
</p>
|
||||
<pre>
|
||||
include EscapeEnhancer
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000057">init_converter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="../SchemeGenerator.html">SchemeGenerator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000057" class="method-detail">
|
||||
<a name="M000057"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000057" class="method-signature">
|
||||
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000057-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/escheme.rb, line 106</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-ivar">@pi</span> = <span class="ruby-value str">'scheme'</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">properties</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,293 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PI::TinyEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PI::TinyEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/erubis/tiny_rb.html">
|
||||
erubis/tiny.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000051">convert</a>
|
||||
<a href="#M000053">evaluate</a>
|
||||
<a href="#M000050">new</a>
|
||||
<a href="#M000052">result</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">EMBEDDED_PATTERN</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">/(^[ \t]*)?<\?rb(\s.*?)\?>([ \t]*\r?\n)?|@(!+)?\{(.*?)\}@/m</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">src</td>
|
||||
<td class="context-item-value"> [R] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000050" class="method-detail">
|
||||
<a name="M000050"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000050" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(input=nil, options={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000050-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/tiny.rb, line 79</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-ivar">@escape</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:escape</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'Erubis::XmlHelper.escape_xml'</span>
|
||||
<span class="ruby-ivar">@src</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">input</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000051" class="method-detail">
|
||||
<a name="M000051"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000051" class="method-signature">
|
||||
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000051-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/tiny.rb, line 88</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
||||
<span class="ruby-identifier">src</span> = <span class="ruby-value str">"_buf = '';"</span> <span class="ruby-comment cmt"># preamble</span>
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-constant">EMBEDDED_PATTERN</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lspace</span>, <span class="ruby-identifier">stmt</span>, <span class="ruby-identifier">rspace</span>, <span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">expr</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>
|
||||
<span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
|
||||
<span class="ruby-identifier">text</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)
|
||||
<span class="ruby-comment cmt">#src << " _buf << '" << escape_text(text) << "';"</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">text</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stmt</span> <span class="ruby-comment cmt"># <?rb ... ?></span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{lspace}#{stmt}#{rspace}"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">lspace</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">stmt</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">";"</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rspace</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># ${...}, $!{...}</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">indicator</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << "</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@escape</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"("</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">expr</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">");"</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">indicator</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'!'</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << ("</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">expr</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">").to_s;"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = $' || input # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">input</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-comment cmt">#src << " _buf << '" << escape_text(rest) << "';"</span>
|
||||
<span class="ruby-identifier">rest</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rest</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rest</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n_buf.to_s\n"</span> <span class="ruby-comment cmt"># postamble</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">src</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000053" class="method-detail">
|
||||
<a name="M000053"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000053" class="method-signature">
|
||||
<span class="method-name">evaluate</span><span class="method-args">(_context=Object.new)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000053-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/tiny.rb, line 132</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">_context</span>=<span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-identifier">_obj</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">_context</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_obj</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">_context</span> = <span class="ruby-identifier">_obj</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-identifier">_context</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-ivar">@src</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000052" class="method-detail">
|
||||
<a name="M000052"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000052" class="method-signature">
|
||||
<span class="method-name">result</span><span class="method-args">(_binding=TOPLEVEL_BINDING)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
def escape_text(text)
|
||||
</p>
|
||||
<pre>
|
||||
return text.gsub!(/['\\]/, '\\\\\&') || text
|
||||
</pre>
|
||||
<p>
|
||||
end
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000052-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/tiny.rb, line 128</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>(<span class="ruby-identifier">_binding</span>=<span class="ruby-constant">TOPLEVEL_BINDING</span>)
|
||||
<span class="ruby-identifier">eval</span> <span class="ruby-ivar">@src</span>, <span class="ruby-identifier">_binding</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,179 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PercentLineEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PercentLineEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
regards lines starting with ’%’ as program code
|
||||
</p>
|
||||
<p>
|
||||
this is for compatibility to eruby and <a href="../ERB.html">ERB</a>.
|
||||
</p>
|
||||
<p>
|
||||
this is language-independent.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000173">add_text</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000173" class="method-detail">
|
||||
<a name="M000173"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000173" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000173-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 449</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">text2</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/^\%(.*?\r?\n)/</span>) <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-identifier">line</span> = <span class="ruby-identifier">$1</span>
|
||||
<span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>
|
||||
<span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">text</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
|
||||
<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">end</span>(<span class="ruby-value">0</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text2</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">text2</span> = <span class="ruby-identifier">str</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">text2</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">str</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?%</span>
|
||||
<span class="ruby-identifier">text2</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">line</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text2</span>)
|
||||
<span class="ruby-identifier">text2</span> = <span class="ruby-value str">''</span>
|
||||
<span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">line</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt">#rest = pos == 0 ? text : $' # ruby1.8</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">text</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">text</span>[<span class="ruby-identifier">pos</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-comment cmt"># ruby1.9</span>
|
||||
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text2</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-identifier">text2</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">rest</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rest</span>
|
||||
<span class="ruby-identifier">rest</span> = <span class="ruby-identifier">text2</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">rest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PercentLineEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PercentLineEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PercentLineEnhancer.html">PercentLineEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,344 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PerlGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PerlGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eperl_rb.html">
|
||||
erubis/engine/eperl.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000160">add_expr_debug</a>
|
||||
<a href="#M000159">add_expr_escaped</a>
|
||||
<a href="#M000158">add_expr_literal</a>
|
||||
<a href="#M000162">add_postamble</a>
|
||||
<a href="#M000155">add_preamble</a>
|
||||
<a href="#M000161">add_stmt</a>
|
||||
<a href="#M000157">add_text</a>
|
||||
<a href="#M000156">escape_text</a>
|
||||
<a href="#M000154">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000160" class="method-detail">
|
||||
<a name="M000160"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000160" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000160-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 49</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\'/</span>, <span class="ruby-value str">"\\'"</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"('*** debug: #{code}=', #{code}, \"\\n\");"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000159" class="method-detail">
|
||||
<a name="M000159"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000159" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000159-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 45</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000158" class="method-detail">
|
||||
<a name="M000158"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000158" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000158-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 40</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"("</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"); "</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000162" class="method-detail">
|
||||
<a name="M000162"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000162" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000162-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 59</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000155" class="method-detail">
|
||||
<a name="M000155"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000155" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000155-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 28</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"use HTML::Entities; "</span>;
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000161" class="method-detail">
|
||||
<a name="M000161"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000161" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000161-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 55</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000157" class="method-detail">
|
||||
<a name="M000157"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000157" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000157-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 36</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"('"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"'); "</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000156" class="method-detail">
|
||||
<a name="M000156"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000156" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000156-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 32</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000154" class="method-detail">
|
||||
<a name="M000154"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000154" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000154-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 22</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'encode_entities'</span>
|
||||
<span class="ruby-ivar">@func</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:func</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'print'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,350 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PhpGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PhpGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/ephp_rb.html">
|
||||
erubis/engine/ephp.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000125">add_expr_debug</a>
|
||||
<a href="#M000124">add_expr_escaped</a>
|
||||
<a href="#M000123">add_expr_literal</a>
|
||||
<a href="#M000127">add_postamble</a>
|
||||
<a href="#M000120">add_preamble</a>
|
||||
<a href="#M000126">add_stmt</a>
|
||||
<a href="#M000122">add_text</a>
|
||||
<a href="#M000121">escape_text</a>
|
||||
<a href="#M000119">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000125" class="method-detail">
|
||||
<a name="M000125"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000125" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000125-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 46</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\'/</span>, <span class="ruby-value str">"\\'"</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<?php error_log('*** debug: #{s}='.(#{code}), 0); ?>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000124" class="method-detail">
|
||||
<a name="M000124"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000124" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000124-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 42</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000123" class="method-detail">
|
||||
<a name="M000123"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000123" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000123-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 37</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<?php echo #{code}; ?>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000127" class="method-detail">
|
||||
<a name="M000127"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000127" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000127-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 63</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-comment cmt"># empty</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000120" class="method-detail">
|
||||
<a name="M000120"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000120" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000120-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 25</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-comment cmt"># empty</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000126" class="method-detail">
|
||||
<a name="M000126"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000126" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000126-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 52</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<?php"</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" "</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">!=</span> <span class="ruby-value">?\ </span><span class="ruby-comment cmt">#</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">chomp!</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"?>\n"</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"?>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000122" class="method-detail">
|
||||
<a name="M000122"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000122" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000122-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 33</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000121" class="method-detail">
|
||||
<a name="M000121"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000121" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000121-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 29</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/<\?xml\b/</span>, <span class="ruby-value str">'<<?php ?>?xml'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000119" class="method-detail">
|
||||
<a name="M000119"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000119" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000119-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/ephp.rb, line 20</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'htmlspecialchars'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,183 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PreprocessingEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PreprocessingEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/preprocessing_rb.html">
|
||||
erubis/preprocessing.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Erubis::Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
for preprocessing
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000204">add_expr_escaped</a>
|
||||
<a href="#M000203">new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000203" class="method-detail">
|
||||
<a name="M000203"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000203" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(input, params={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000203-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/preprocessing.rb, line 17</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">params</span>={})
|
||||
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span>
|
||||
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:pattern</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">'\[% %\]'</span> <span class="ruby-comment cmt"># use '[%= %]' instead of '<%= %>'</span>
|
||||
<span class="ruby-comment cmt">#params[:escape] = true # transport '[%= %]' and '[%== %]'</span>
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000204" class="method-detail">
|
||||
<a name="M000204"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000204" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000204-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000204-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/preprocessing.rb, line 24</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-node">"_decode((#{code}))"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,212 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PreprocessingHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PreprocessingHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/preprocessing_rb.html">
|
||||
erubis/preprocessing.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
helper methods for preprocessing
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000144">_?</a>
|
||||
<a href="#M000143">_P</a>
|
||||
<a href="#M000145">_decode</a>
|
||||
<a href="#M000142">_p</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000144" class="method-detail">
|
||||
<a name="M000144"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">_?</span><span class="method-args">(arg)</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Alias for <a href="PreprocessingHelper.html#M000142">_p</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000143" class="method-detail">
|
||||
<a name="M000143"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000143" class="method-signature">
|
||||
<span class="method-name">_P</span><span class="method-args">(arg)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000143-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/preprocessing.rb, line 42</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_P</span>(<span class="ruby-identifier">arg</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"<%=h(#{arg})%>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000145" class="method-detail">
|
||||
<a name="M000145"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000145" class="method-signature">
|
||||
<span class="method-name">_decode</span><span class="method-args">(arg)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000145-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/preprocessing.rb, line 48</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_decode</span>(<span class="ruby-identifier">arg</span>)
|
||||
<span class="ruby-identifier">arg</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%3C%25(?:=|%3D)(.*?)%25%3E/</span>) { <span class="ruby-node">"<%=#{CGI.unescape($1)}%>"</span> }
|
||||
<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/&lt;%=(.*?)%&gt;/</span>) { <span class="ruby-node">"<%=#{CGI.unescapeHTML($1)}%>"</span> }
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">arg</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000142" class="method-detail">
|
||||
<a name="M000142"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000142" class="method-signature">
|
||||
<span class="method-name">_p</span><span class="method-args">(arg)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000142-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/preprocessing.rb, line 38</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_p</span>(<span class="ruby-identifier">arg</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"<%=#{arg}%>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,212 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PrintEnabledEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PrintEnabledEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
enable <a href="PrintEnabledEnhancer.html#M000152">print</a> function
|
||||
</p>
|
||||
<p>
|
||||
Notice: use Eruby#evaluate() and don‘t use Eruby#result() to be
|
||||
enable <a href="PrintEnabledEnhancer.html#M000152">print</a> function.
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000151">add_preamble</a>
|
||||
<a href="#M000153">evaluate</a>
|
||||
<a href="#M000152">print</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000151" class="method-detail">
|
||||
<a name="M000151"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000151" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000151-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 127</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"@_buf = "</span>
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000153" class="method-detail">
|
||||
<a name="M000153"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000153" class="method-signature">
|
||||
<span class="method-name">evaluate</span><span class="method-args">(context=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000153-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 138</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">_src</span> = <span class="ruby-ivar">@src</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{key}"</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">context</span>
|
||||
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">name</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_eval</span>(<span class="ruby-identifier">_src</span>, (<span class="ruby-ivar">@filename</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'(erubis)'</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000152" class="method-detail">
|
||||
<a name="M000152"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000152" class="method-signature">
|
||||
<span class="method-name">print</span><span class="method-args">(*args)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000152-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 132</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
||||
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-ivar">@_buf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PrintEnabledEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PrintEnabledEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PrintEnabledEnhancer.html">PrintEnabledEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,244 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::PrintOutEnhancer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PrintOutEnhancer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/enhancer_rb.html">
|
||||
erubis/enhancer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
use print statement instead of ‘_buf << …’
|
||||
</p>
|
||||
<p>
|
||||
this is only for <a href="Eruby.html">Eruby</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000180">add_expr_escaped</a>
|
||||
<a href="#M000179">add_expr_literal</a>
|
||||
<a href="#M000181">add_postamble</a>
|
||||
<a href="#M000177">add_preamble</a>
|
||||
<a href="#M000178">add_text</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000180" class="method-detail">
|
||||
<a name="M000180"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000180" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000180-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 102</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' print '</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000179" class="method-detail">
|
||||
<a name="M000179"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000179" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000179-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 98</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' print(('</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">').to_s);'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000181" class="method-detail">
|
||||
<a name="M000181"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000181" class="method-signature">
|
||||
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000181-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 106</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000177" class="method-detail">
|
||||
<a name="M000177"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000177" class="method-signature">
|
||||
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000177-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 91</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000178" class="method-detail">
|
||||
<a name="M000178"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000178" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000178-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 94</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" print '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PrintOutEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PrintOutEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PrintOutEnhancer.html">PrintOutEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,121 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Erubis::PrintOutSimplifiedEruby</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Erubis::PrintOutSimplifiedEruby</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/enhanced_rb.html">
|
||||
erubis/engine/enhanced.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="Eruby.html">
|
||||
Eruby
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="PrintOutEnhancer.html">PrintOutEnhancer</a></span>
|
||||
<span class="include-name"><a href="SimplifyEnhancer.html">SimplifyEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,227 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::RubyEvaluator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::RubyEvaluator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/evaluator_rb.html">
|
||||
erubis/evaluator.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
evaluator for Ruby
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000197">def_method</a>
|
||||
<a href="#M000196">evaluate</a>
|
||||
<a href="#M000195">result</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Evaluator.html">Evaluator</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000197" class="method-detail">
|
||||
<a name="M000197"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000197" class="method-signature">
|
||||
<span class="method-name">def_method</span><span class="method-args">(object, method_name, filename=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
if object is an Class or Module then define instance method to it, else
|
||||
define singleton method to it.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000197-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 79</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">def_method</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">m</span> = <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Module</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">:module_eval</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">:instance_eval</span>
|
||||
<span class="ruby-identifier">object</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">m</span>, <span class="ruby-node">"def #{method_name}; #{@src}; end"</span>, <span class="ruby-identifier">filename</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@filename</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'(erubis)'</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000196" class="method-detail">
|
||||
<a name="M000196"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000196" class="method-signature">
|
||||
<span class="method-name">evaluate</span><span class="method-args">(_context=Context.new)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
invoke context.instance_eval(@src)
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000196-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 69</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">_context</span>=<span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>)
|
||||
<span class="ruby-identifier">_context</span> = <span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">_context</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-comment cmt">#return _context.instance_eval(@src, @filename || '(erubis)')</span>
|
||||
<span class="ruby-comment cmt">#@_proc ||= eval("proc { #{@src} }", Erubis::EMPTY_BINDING, @filename || '(erubis)')</span>
|
||||
<span class="ruby-ivar">@_proc</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">eval</span>(<span class="ruby-node">"proc { #{@src} }"</span>, <span class="ruby-identifier">binding</span>(), <span class="ruby-ivar">@filename</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'(erubis)'</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_context</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-ivar">@_proc</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000195" class="method-detail">
|
||||
<a name="M000195"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000195" class="method-signature">
|
||||
<span class="method-name">result</span><span class="method-args">(_binding_or_hash=TOPLEVEL_BINDING)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
eval(@src) with binding object
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000195-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/evaluator.rb, line 53</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>(<span class="ruby-identifier">_binding_or_hash</span>=<span class="ruby-constant">TOPLEVEL_BINDING</span>)
|
||||
<span class="ruby-identifier">_arg</span> = <span class="ruby-identifier">_binding_or_hash</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
||||
<span class="ruby-identifier">_b</span> = <span class="ruby-identifier">binding</span>()
|
||||
<span class="ruby-identifier">eval</span> <span class="ruby-identifier">_arg</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">"#{k} = _arg[#{k.inspect}]; "</span>}.<span class="ruby-identifier">join</span>, <span class="ruby-identifier">_b</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">_arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Binding</span>)
|
||||
<span class="ruby-identifier">_b</span> = <span class="ruby-identifier">_arg</span>
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">_arg</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">_b</span> = <span class="ruby-identifier">binding</span>()
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{self.class.name}#result(): argument should be Binding or Hash but passed #{_arg.class.name} object."</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">eval</span>(<span class="ruby-ivar">@src</span>, <span class="ruby-identifier">_b</span>, (<span class="ruby-ivar">@filename</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'(erubis'</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,327 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: Erubis::RubyGenerator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">Erubis::RubyGenerator</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/erubis/engine/eruby_rb.html">
|
||||
erubis/engine/eruby.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
code generator for Ruby
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000118">add_expr_debug</a>
|
||||
<a href="#M000117">add_expr_escaped</a>
|
||||
<a href="#M000116">add_expr_literal</a>
|
||||
<a href="#M000115">add_stmt</a>
|
||||
<a href="#M000114">add_text</a>
|
||||
<a href="#M000112">escape_text</a>
|
||||
<a href="#M000113">escaped_expr</a>
|
||||
<a href="#M000111">init_generator</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Generator.html">Generator</a></span>
|
||||
<span class="include-name"><a href="StringBufferEnhancer.html">StringBufferEnhancer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000118" class="method-detail">
|
||||
<a name="M000118"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000118" class="method-signature">
|
||||
<span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000118-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 62</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span>
|
||||
<span class="ruby-identifier">s</span> = (<span class="ruby-identifier">code</span>.<span class="ruby-identifier">dump</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A"(.*)"\z/</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">$1</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' $stderr.puts("*** debug: '</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'=#{('</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">').inspect}");'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000117" class="method-detail">
|
||||
<a name="M000117"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000117" class="method-signature">
|
||||
<span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000117-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' _buf << '</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000116" class="method-detail">
|
||||
<a name="M000116"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000116" class="method-signature">
|
||||
<span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000116-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 54</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' _buf << ('</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">').to_s;'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000115" class="method-detail">
|
||||
<a name="M000115"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000115" class="method-signature">
|
||||
<span class="method-name">add_stmt</span><span class="method-args">(src, code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000115-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 48</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-comment cmt">#src << code << ';'</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">code</span>
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">';'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">code</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000114" class="method-detail">
|
||||
<a name="M000114"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000114" class="method-signature">
|
||||
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000114-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 44</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" _buf << '"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"';"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000112" class="method-detail">
|
||||
<a name="M000112"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000112" class="method-signature">
|
||||
<span class="method-name">escape_text</span><span class="method-args">(text)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000112-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>)
|
||||
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&'</span>) <span class="ruby-comment cmt"># "'" => "\\'", '\\' => '\\\\'</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000113" class="method-detail">
|
||||
<a name="M000113"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000113" class="method-signature">
|
||||
<span class="method-name">escaped_expr</span><span class="method-args">(code)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000113-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 34</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{@escapefunc}(#{code})"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000111" class="method-detail">
|
||||
<a name="M000111"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000111" class="method-signature">
|
||||
<span class="method-name">init_generator</span><span class="method-args">(properties={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000111-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File erubis/engine/eruby.rb, line 21</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>={})
|
||||
<span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-ivar">@escapefunc</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">"Erubis::XmlHelper.escape_xml"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue