tenjin 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +163 -0
- data/MIT-LICENSE +16 -17
- data/README.txt +5 -5
- data/benchmark/Makefile +9 -0
- data/benchmark/bench.rb +3 -2
- data/bin/rbtenjin +6 -3
- data/doc/docstyle.css +25 -4
- data/doc/users-guide.html +2088 -1563
- data/lib/tenjin.rb +784 -158
- data/public_html/_layout.rbhtml +33 -0
- data/public_html/css/style.css +77 -0
- data/public_html/env.rbhtml +15 -0
- data/public_html/favicon.ico +0 -0
- data/public_html/hello.rbhtml +14 -0
- data/public_html/index.rbhtml +39 -0
- data/public_html/rbtenjin.cgi +188 -0
- data/tenjin.gemspec +9 -6
- data/test/data/examples/preprocessing/main.rb +1 -1
- data/test/data/examples/preprocessing/select.rbhtml +1 -1
- data/test/data/faq/{ex11-bench.rb → ex10-bench.rb} +3 -3
- data/test/data/faq/ex10-content.rbhtml +8 -11
- data/test/data/faq/{ex11-layout1.rbhtml → ex10-layout1.rbhtml} +0 -0
- data/test/data/faq/{ex11-layout2.rbhtml → ex10-layout2.rbhtml} +0 -0
- data/test/data/faq/{ex11.rb → ex10.rb} +1 -1
- data/test/data/faq/{ex11.rbhtml → ex10.rbhtml} +0 -0
- data/test/data/faq/{ex11.source → ex10.source} +2 -2
- data/test/data/faq/{ex11_arraybuffer.result → ex10_arraybuffer.result} +1 -1
- data/test/data/faq/{ex5.rbhtml → ex2.rbhtml} +0 -0
- data/test/data/faq/{ex5_template_args.source → ex2_template_args.source} +1 -1
- data/test/data/faq/{ex7-expr-pattern.rb → ex4-expr-pattern.rb} +1 -1
- data/test/data/faq/{ex7-expr-pattern.rbhtml → ex4-expr-pattern.rbhtml} +0 -0
- data/test/data/faq/{ex7_expr_pattern.result → ex4_expr_pattern.result} +1 -1
- data/test/data/faq/{ex6-content.rhtml → ex5-content.rhtml} +0 -0
- data/test/data/faq/{ex6-layout.rhtml → ex5-layout.rhtml} +0 -0
- data/test/data/faq/{ex6.rb → ex5.rb} +2 -2
- data/test/data/faq/{ex6_eruby.result → ex5_eruby.result} +1 -1
- data/test/data/faq/{ex2-content.rbhtml → ex6-content.rbhtml} +0 -0
- data/test/data/faq/{ex2-layout.rbhtml → ex6-layout.rbhtml} +0 -0
- data/test/data/faq/{ex2_removenl.result → ex6_removenl.result} +1 -1
- data/test/data/faq/ex7-m18n.rb +48 -0
- data/test/data/faq/{ex8-m18n.rbhtml → ex7-m18n.rbhtml} +0 -0
- data/test/data/faq/{ex8_m18n.result → ex7_m18n.result} +1 -1
- data/test/data/faq/ex8-baselayout.rbhtml +8 -0
- data/test/data/faq/ex8-content.rbhtml +6 -0
- data/test/data/faq/{ex9-mylayout.rbhtml → ex8-mylayout.rbhtml} +0 -0
- data/test/data/faq/{ex9_changelayout.result → ex8_changelayout.result} +1 -1
- data/test/data/faq/ex9-baselayout.rbhtml +24 -5
- data/test/data/faq/ex9-content.rbhtml +12 -6
- data/test/data/faq/{ex10-customlayout.rbhtml → ex9-customlayout.rbhtml} +1 -1
- data/test/data/faq/{ex10_inherit.result → ex9_inherit.result} +1 -1
- data/test/data/faq/helpers1.rb +17 -0
- data/test/data/faq/helpers1.rbhtml +4 -0
- data/test/data/faq/helpers1.result +11 -0
- data/test/data/faq/helpers2.rb +21 -0
- data/test/data/faq/helpers2.rbhtml +4 -0
- data/test/data/faq/helpers2.result +11 -0
- data/test/data/faq/weekday1.rb +6 -0
- data/test/data/faq/weekday1.rbhtml +9 -0
- data/test/data/faq/weekday1.result +23 -0
- data/test/data/faq/weekday2.rb +8 -0
- data/test/data/faq/weekday2.rbhtml +10 -0
- data/test/data/faq/weekday2.result +24 -0
- data/test/data/faq/weekday3.rb +22 -0
- data/test/data/faq/weekday3.rbhtml +3 -0
- data/test/data/faq/weekday3.result +28 -0
- data/test/data/users_guide/test_010/main.rb +14 -0
- data/test/data/users_guide/test_010/result.output +13 -0
- data/test/data/users_guide/test_010/views/page.rbhtml +11 -0
- data/test/data/users_guide/test_011/main.rb +14 -0
- data/test/data/users_guide/test_011/result.output +2 -0
- data/test/data/users_guide/test_011/views/page.rbhtml +11 -0
- data/test/data/users_guide/test_020/main.rb +14 -0
- data/test/data/users_guide/test_020/result.output +13 -0
- data/test/data/users_guide/test_020/views/page.rbhtml +11 -0
- data/test/data/users_guide/test_021/main.rb +12 -0
- data/test/data/users_guide/test_021/result.output +12 -0
- data/test/data/users_guide/test_021/views/page.rbhtml +11 -0
- data/test/data/users_guide/test_030/main.rb +14 -0
- data/test/data/users_guide/test_030/result.output +23 -0
- data/test/data/users_guide/test_030/views/_layout.rbhtml +10 -0
- data/test/data/users_guide/test_030/views/page.rbhtml +11 -0
- data/test/data/users_guide/test_040/main.rb +14 -0
- data/test/data/users_guide/test_040/result.output +23 -0
- data/test/data/users_guide/test_040/views/_layout.rbhtml +10 -0
- data/test/data/users_guide/test_040/views/page.rbhtml +12 -0
- data/test/data/users_guide/test_050/main.rb +14 -0
- data/test/data/users_guide/test_050/result.output +14 -0
- data/test/data/users_guide/test_050/views/_layout.rbhtml +10 -0
- data/test/data/users_guide/test_050/views/page.rbhtml +13 -0
- data/test/data/users_guide/test_051/main.rb +14 -0
- data/test/data/users_guide/test_051/result.output +12 -0
- data/test/data/users_guide/test_051/views/_layout.rbhtml +11 -0
- data/test/data/users_guide/test_051/views/page.rbhtml +13 -0
- data/test/data/users_guide/test_060/main.rb +14 -0
- data/test/data/users_guide/test_060/result.output +29 -0
- data/test/data/users_guide/test_060/views/_footer.rbhtml +3 -0
- data/test/data/users_guide/test_060/views/_header.rbhtml +3 -0
- data/test/data/users_guide/test_060/views/_layout.rbhtml +13 -0
- data/test/data/users_guide/test_060/views/page.rbhtml +13 -0
- data/test/data/users_guide/test_070/main.rb +14 -0
- data/test/data/users_guide/test_070/result.output +29 -0
- data/test/data/users_guide/test_070/views/_footer.rbhtml +3 -0
- data/test/data/users_guide/test_070/views/_header.rbhtml +3 -0
- data/test/data/users_guide/test_070/views/_layout.rbhtml +13 -0
- data/test/data/users_guide/test_070/views/page.rbhtml +13 -0
- data/test/data/users_guide/test_capturing/main.rb +24 -0
- data/test/data/users_guide/test_capturing/result.output +28 -0
- data/test/data/users_guide/test_capturing/views/_layout.rbhtml +21 -0
- data/test/data/users_guide/test_capturing/views/blog-post.rbhtml +13 -0
- data/test/data/users_guide/test_context/context.rb +5 -0
- data/test/data/users_guide/test_context/context.yaml +4 -0
- data/test/data/users_guide/test_context/example.rbhtml +5 -0
- data/test/data/users_guide/test_context/result1.output +6 -0
- data/test/data/users_guide/test_context/result2.output +6 -0
- data/test/data/users_guide/test_context/result3.output +6 -0
- data/test/data/users_guide/test_context/result4.output +6 -0
- data/test/data/users_guide/test_convert/example.rbhtml +5 -0
- data/test/data/users_guide/test_convert/result1.output +7 -0
- data/test/data/users_guide/test_convert/result2.output +6 -0
- data/test/data/users_guide/test_escape/main.rb +4 -0
- data/test/data/users_guide/test_escape/result.output +5 -0
- data/test/data/users_guide/test_escape/views/page.rbhtml +4 -0
- data/test/data/users_guide/test_execute/example.rbhtml +6 -0
- data/test/data/users_guide/test_execute/result.output +6 -0
- data/test/data/users_guide/test_fragmentcache/cache.d/items/1 +5 -0
- data/test/data/users_guide/test_fragmentcache/main.rb +21 -0
- data/test/data/users_guide/test_fragmentcache/result.output +8 -0
- data/test/data/users_guide/test_fragmentcache/result2.output +6 -0
- data/test/data/users_guide/test_fragmentcache/views/items.rbhtml +10 -0
- data/test/data/users_guide/test_logging/ex-logger.rb +11 -0
- data/test/data/users_guide/test_logging/example.rbhtml +0 -0
- data/test/data/users_guide/test_logging/result1.output +3 -0
- data/test/data/users_guide/test_logging/result2.output +2 -0
- data/test/data/users_guide/test_m17n/m17n.rb +44 -0
- data/test/data/users_guide/test_m17n/m17n.rbhtml +5 -0
- data/test/data/users_guide/test_m17n/result.output +9 -0
- data/test/data/users_guide/test_m17n/result_en.output +4 -0
- data/test/data/users_guide/test_m17n/result_fr.output +4 -0
- data/test/data/users_guide/test_nested/main.rb +8 -0
- data/test/data/users_guide/test_nested/result.output +15 -0
- data/test/data/users_guide/test_nested/views/_blog_layout.rbhtml +5 -0
- data/test/data/users_guide/{layout8_html.rbhtml → test_nested/views/_site_layout.rbhtml} +0 -0
- data/test/data/users_guide/test_nested/views/blog_post.rbhtml +4 -0
- data/test/data/users_guide/test_preprocessing/pp-example1.rb +14 -0
- data/test/data/users_guide/test_preprocessing/result1a.output +11 -0
- data/test/data/users_guide/test_preprocessing/result1b.output +5 -0
- data/test/data/users_guide/test_preprocessing/result1c.output +6 -0
- data/test/data/users_guide/test_preprocessing/result2a.output +10 -0
- data/test/data/users_guide/test_preprocessing/result2b.output +10 -0
- data/test/data/users_guide/test_preprocessing/result3a.output +2 -0
- data/test/data/users_guide/test_preprocessing/result3b.output +2 -0
- data/test/data/users_guide/test_preprocessing/views/pp-example1.rbhtml +4 -0
- data/test/data/users_guide/{example12.rbhtml → test_preprocessing/views/pp-example2.rbhtml} +4 -4
- data/test/data/users_guide/test_preprocessing/views/pp-example3.rbhtml +7 -0
- data/test/data/users_guide/test_retrieve/example.rbhtml +10 -0
- data/test/data/users_guide/test_retrieve/result1.output +11 -0
- data/test/data/users_guide/test_retrieve/result2.output +11 -0
- data/test/data/users_guide/test_retrieve/result3.output +11 -0
- data/test/data/users_guide/test_retrieve/result4.output +8 -0
- data/test/data/users_guide/test_retrieve/result5.output +5 -0
- data/test/data/users_guide/test_safe/result.output +6 -0
- data/test/data/users_guide/test_safe/safe-test.rb +21 -0
- data/test/data/users_guide/test_safehelper/main.rb +16 -0
- data/test/data/users_guide/test_safehelper/result.output +8 -0
- data/test/data/users_guide/{example3.rbhtml → test_syntax_check/example.rbhtml} +0 -0
- data/test/data/users_guide/test_syntax_check/result.output +2 -0
- data/test/data/users_guide/test_trace/layout.rbhtml +7 -0
- data/test/data/users_guide/test_trace/main.rbhtml +5 -0
- data/test/data/users_guide/test_trace/result.output +16 -0
- data/test/data/users_guide/test_trace/trace-example.rb +4 -0
- data/test/oktest.rb +755 -0
- data/test/test_all.rb +24 -14
- data/test/test_engine.rb +628 -63
- data/test/test_engine.yaml +40 -3
- data/test/test_examples.rb +14 -12
- data/test/test_faq.rb +17 -12
- data/test/test_htmlhelper.rb +104 -33
- data/test/test_main.rb +32 -21
- data/test/test_main.yaml +2 -2
- data/test/test_safe.rb +206 -0
- data/test/test_store.rb +220 -0
- data/test/test_tcache.rb +94 -0
- data/test/test_template.rb +65 -23
- data/test/test_template.yaml +7 -7
- data/test/test_users_guide.rb +75 -29
- data/test/testcase-helper.rb +20 -18
- data/test/testunit-assertions.rb +71 -0
- metadata +185 -159
- data/doc-api/classes/Tenjin.html +0 -141
- data/doc-api/classes/Tenjin/ArrayBufferTemplate.html +0 -270
- data/doc-api/classes/Tenjin/BaseContext.html +0 -329
- data/doc-api/classes/Tenjin/Context.html +0 -126
- data/doc-api/classes/Tenjin/ContextHelper.html +0 -461
- data/doc-api/classes/Tenjin/Engine.html +0 -616
- data/doc-api/classes/Tenjin/ErubisTemplate.html +0 -166
- data/doc-api/classes/Tenjin/HtmlHelper.html +0 -359
- data/doc-api/classes/Tenjin/Preprocessor.html +0 -242
- data/doc-api/classes/Tenjin/Template.html +0 -916
- data/doc-api/created.rid +0 -1
- data/doc-api/files/README_txt.html +0 -188
- data/doc-api/files/lib/tenjin_rb.html +0 -136
- data/doc-api/fr_class_index.html +0 -36
- data/doc-api/fr_file_index.html +0 -28
- data/doc-api/fr_method_index.html +0 -91
- data/doc-api/index.html +0 -24
- data/doc-api/rdoc-style.css +0 -208
- data/doc/examples.html +0 -312
- data/doc/faq.html +0 -909
- data/examples/preprocessing/select.rbhtml.cache +0 -17
- data/test/Rookbook.yaml +0 -14
- data/test/assert-text-equal.rb +0 -45
- data/test/data/faq/ex10-baselayout.rbhtml +0 -27
- data/test/data/faq/ex11-content.rbhtml +0 -9
- data/test/data/faq/ex8-m18n.rb +0 -77
- data/test/data/users_guide/content6.rbhtml +0 -3
- data/test/data/users_guide/content7.rbhtml +0 -5
- data/test/data/users_guide/content8.rbhtml +0 -2
- data/test/data/users_guide/contextdata.rb +0 -7
- data/test/data/users_guide/datafile.rb +0 -5
- data/test/data/users_guide/datafile.yaml +0 -10
- data/test/data/users_guide/ex.rbhtml +0 -6
- data/test/data/users_guide/ex.result +0 -7
- data/test/data/users_guide/ex.script +0 -5
- data/test/data/users_guide/ex_script.result +0 -7
- data/test/data/users_guide/ex_source.result +0 -8
- data/test/data/users_guide/example1.rbhtml +0 -12
- data/test/data/users_guide/example1.result +0 -17
- data/test/data/users_guide/example10.rbhtml +0 -4
- data/test/data/users_guide/example10_template_args.result +0 -6
- data/test/data/users_guide/example11.rbhtml +0 -5
- data/test/data/users_guide/example11_template_args_result +0 -2
- data/test/data/users_guide/example12_preprocessed.result +0 -10
- data/test/data/users_guide/example12_preprocessed_source.result +0 -10
- data/test/data/users_guide/example13.rbhtml +0 -6
- data/test/data/users_guide/example13_preprocessed.result +0 -2
- data/test/data/users_guide/example13_preprocessed_source.result +0 -2
- data/test/data/users_guide/example14.rb +0 -32
- data/test/data/users_guide/example14.rbhtml +0 -6
- data/test/data/users_guide/example14_tmplclass.result +0 -15
- data/test/data/users_guide/example15.rb +0 -10
- data/test/data/users_guide/example15_escapefunc.result +0 -14
- data/test/data/users_guide/example16.rbhtml +0 -4
- data/test/data/users_guide/example16a.rb +0 -10
- data/test/data/users_guide/example16a.result +0 -4
- data/test/data/users_guide/example16b.rb +0 -13
- data/test/data/users_guide/example16b.result +0 -4
- data/test/data/users_guide/example16c.rb +0 -12
- data/test/data/users_guide/example16c.result +0 -4
- data/test/data/users_guide/example16d.rb +0 -27
- data/test/data/users_guide/example16d.result +0 -4
- data/test/data/users_guide/example1_S.result +0 -14
- data/test/data/users_guide/example1_SXNC.result +0 -10
- data/test/data/users_guide/example1_source.result +0 -14
- data/test/data/users_guide/example2.rbhtml +0 -3
- data/test/data/users_guide/example2_sb.result2 +0 -9
- data/test/data/users_guide/example3_syntaxcheck.result +0 -2
- data/test/data/users_guide/example4.rbhtml +0 -13
- data/test/data/users_guide/example4_datafile_rb.result +0 -13
- data/test/data/users_guide/example4_yaml.result +0 -13
- data/test/data/users_guide/example5.rbhtml +0 -9
- data/test/data/users_guide/example5_datastr_rb.result +0 -9
- data/test/data/users_guide/example5_datastr_yaml.result +0 -9
- data/test/data/users_guide/example6.rbhtml +0 -19
- data/test/data/users_guide/example6_layout.result +0 -29
- data/test/data/users_guide/example6_nested.result +0 -28
- data/test/data/users_guide/example7_layout2.result +0 -13
- data/test/data/users_guide/example8_layout3.result +0 -8
- data/test/data/users_guide/example9.rbhtml +0 -18
- data/test/data/users_guide/example9_capture.result +0 -26
- data/test/data/users_guide/footer.html +0 -5
- data/test/data/users_guide/footer.rbhtml +0 -4
- data/test/data/users_guide/layout6.rbhtml +0 -17
- data/test/data/users_guide/layout7.rbhtml +0 -9
- data/test/data/users_guide/layout8_xhtml.rbhtml +0 -6
- data/test/data/users_guide/layout9.rbhtml +0 -25
- data/test/data/users_guide/sidemenu.rbhtml +0 -5
- data/test/data/users_guide/user_app.cgi +0 -39
- data/test/data/users_guide/user_app.result +0 -30
- data/test/data/users_guide/user_create.rbhtml +0 -6
- data/test/data/users_guide/user_edit.rbhtml +0 -7
- data/test/data/users_guide/user_form.rbhtml +0 -10
- data/test/data/users_guide/user_layout.rbhtml +0 -16
@@ -1,126 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Tenjin::Context</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Tenjin::Context</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/tenjin_rb.html">
|
59
|
-
lib/tenjin.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="BaseContext.html">
|
69
|
-
BaseContext
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
context class for <a href="Template.html">Template</a>
|
86
|
-
</p>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
</div>
|
92
|
-
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
|
97
|
-
<!-- if includes -->
|
98
|
-
<div id="includes">
|
99
|
-
<h3 class="section-bar">Included Modules</h3>
|
100
|
-
|
101
|
-
<div id="includes-list">
|
102
|
-
<span class="include-name"><a href="HtmlHelper.html">HtmlHelper</a></span>
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
<div id="section">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
<!-- if method_list -->
|
116
|
-
|
117
|
-
|
118
|
-
</div>
|
119
|
-
|
120
|
-
|
121
|
-
<div id="validator-badges">
|
122
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
</body>
|
126
|
-
</html>
|
@@ -1,461 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: Tenjin::ContextHelper</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Tenjin::ContextHelper</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/tenjin_rb.html">
|
59
|
-
lib/tenjin.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
</table>
|
66
|
-
</div>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<div id="contextContent">
|
74
|
-
|
75
|
-
<div id="description">
|
76
|
-
<p>
|
77
|
-
helper module for <a href="BaseContext.html">BaseContext</a> class
|
78
|
-
</p>
|
79
|
-
|
80
|
-
</div>
|
81
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="method-list">
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
87
|
-
|
88
|
-
<div class="name-list">
|
89
|
-
<a href="#M000016">_P</a>
|
90
|
-
<a href="#M000017">_decode_params</a>
|
91
|
-
<a href="#M000015">_p</a>
|
92
|
-
<a href="#M000014">captured_as</a>
|
93
|
-
<a href="#M000011">echo</a>
|
94
|
-
<a href="#M000009">escape</a>
|
95
|
-
<a href="#M000010">import</a>
|
96
|
-
<a href="#M000012">start_capture</a>
|
97
|
-
<a href="#M000013">stop_capture</a>
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
<!-- if includes -->
|
105
|
-
|
106
|
-
<div id="section">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<div id="attribute-list">
|
113
|
-
<h3 class="section-bar">Attributes</h3>
|
114
|
-
|
115
|
-
<div class="name-list">
|
116
|
-
<table>
|
117
|
-
<tr class="top-aligned-row context-row">
|
118
|
-
<td class="context-item-name">_buf</td>
|
119
|
-
<td class="context-item-value"> [RW] </td>
|
120
|
-
<td class="context-item-desc"></td>
|
121
|
-
</tr>
|
122
|
-
<tr class="top-aligned-row context-row">
|
123
|
-
<td class="context-item-name">_engine</td>
|
124
|
-
<td class="context-item-value"> [RW] </td>
|
125
|
-
<td class="context-item-desc"></td>
|
126
|
-
</tr>
|
127
|
-
<tr class="top-aligned-row context-row">
|
128
|
-
<td class="context-item-name">_layout</td>
|
129
|
-
<td class="context-item-value"> [RW] </td>
|
130
|
-
<td class="context-item-desc"></td>
|
131
|
-
</tr>
|
132
|
-
</table>
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
<!-- if method_list -->
|
139
|
-
<div id="methods">
|
140
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
141
|
-
|
142
|
-
<div id="method-M000016" class="method-detail">
|
143
|
-
<a name="M000016"></a>
|
144
|
-
|
145
|
-
<div class="method-heading">
|
146
|
-
<a href="#M000016" class="method-signature">
|
147
|
-
<span class="method-name">_P</span><span class="method-args">(arg)</span>
|
148
|
-
</a>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="method-description">
|
152
|
-
<p>
|
153
|
-
ex. <a
|
154
|
-
href="ContextHelper.html#M000016">_P</a>("item[‘name’]")
|
155
|
-
=> ${item[‘name’]}
|
156
|
-
</p>
|
157
|
-
<p><a class="source-toggle" href="#"
|
158
|
-
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
159
|
-
<div class="method-source-code" id="M000016-source">
|
160
|
-
<pre>
|
161
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 206</span>
|
162
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_P</span>(<span class="ruby-identifier">arg</span>)
|
163
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"<`$#{arg}$`>"</span> <span class="ruby-comment cmt"># decoded into ${...} by preprocessor</span>
|
164
|
-
<span class="ruby-keyword kw">end</span>
|
165
|
-
</pre>
|
166
|
-
</div>
|
167
|
-
</div>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
<div id="method-M000017" class="method-detail">
|
171
|
-
<a name="M000017"></a>
|
172
|
-
|
173
|
-
<div class="method-heading">
|
174
|
-
<a href="#M000017" class="method-signature">
|
175
|
-
<span class="method-name">_decode_params</span><span class="method-args">(s)</span>
|
176
|
-
</a>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div class="method-description">
|
180
|
-
<p>
|
181
|
-
decode <`#…#`> and <`$…$`> into #{…} and
|
182
|
-
${…}
|
183
|
-
</p>
|
184
|
-
<p><a class="source-toggle" href="#"
|
185
|
-
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
186
|
-
<div class="method-source-code" id="M000017-source">
|
187
|
-
<pre>
|
188
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 213</span>
|
189
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_decode_params</span>(<span class="ruby-identifier">s</span>)
|
190
|
-
<span class="ruby-identifier">require</span> <span class="ruby-value str">'cgi'</span>
|
191
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
192
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">dup</span>
|
193
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%3C%60%23(.*?)%23%60%3E/i</span><span class="ruby-identifier">m</span>) { <span class="ruby-node">"\#\{#{CGI::unescape($1)}\}"</span> }
|
194
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%3C%60%24(.*?)%24%60%3E/i</span><span class="ruby-identifier">m</span>) { <span class="ruby-node">"\$\{#{CGI::unescape($1)}\}"</span> }
|
195
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/&lt;`\#(.*?)\#`&gt;/</span><span class="ruby-identifier">m</span>) { <span class="ruby-node">"\#\{#{CGI::unescapeHTML($1)}\}"</span> }
|
196
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/&lt;`\$(.*?)\$`&gt;/</span><span class="ruby-identifier">m</span>) { <span class="ruby-node">"\$\{#{CGI::unescapeHTML($1)}\}"</span> }
|
197
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/<`\#(.*?)\#`>/</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'#{\1}'</span>)
|
198
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/<`\$(.*?)\$`>/</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'${\1}'</span>)
|
199
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
200
|
-
<span class="ruby-keyword kw">end</span>
|
201
|
-
</pre>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
</div>
|
205
|
-
|
206
|
-
<div id="method-M000015" class="method-detail">
|
207
|
-
<a name="M000015"></a>
|
208
|
-
|
209
|
-
<div class="method-heading">
|
210
|
-
<a href="#M000015" class="method-signature">
|
211
|
-
<span class="method-name">_p</span><span class="method-args">(arg)</span>
|
212
|
-
</a>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
<p>
|
217
|
-
ex. <a
|
218
|
-
href="ContextHelper.html#M000015">_p</a>("item[‘name’]")
|
219
|
-
=> #{item[‘name’]}
|
220
|
-
</p>
|
221
|
-
<p><a class="source-toggle" href="#"
|
222
|
-
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
223
|
-
<div class="method-source-code" id="M000015-source">
|
224
|
-
<pre>
|
225
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 199</span>
|
226
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_p</span>(<span class="ruby-identifier">arg</span>)
|
227
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"<`\##{arg}\#`>"</span> <span class="ruby-comment cmt"># decoded into #{...} by preprocessor</span>
|
228
|
-
<span class="ruby-keyword kw">end</span>
|
229
|
-
</pre>
|
230
|
-
</div>
|
231
|
-
</div>
|
232
|
-
</div>
|
233
|
-
|
234
|
-
<div id="method-M000014" class="method-detail">
|
235
|
-
<a name="M000014"></a>
|
236
|
-
|
237
|
-
<div class="method-heading">
|
238
|
-
<a href="#M000014" class="method-signature">
|
239
|
-
<span class="method-name">captured_as</span><span class="method-args">(name)</span>
|
240
|
-
</a>
|
241
|
-
</div>
|
242
|
-
|
243
|
-
<div class="method-description">
|
244
|
-
<p>
|
245
|
-
if captured string is found then add it to _buf and return true, else
|
246
|
-
return false. this is a helper method for layout template.
|
247
|
-
</p>
|
248
|
-
<p><a class="source-toggle" href="#"
|
249
|
-
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
250
|
-
<div class="method-source-code" id="M000014-source">
|
251
|
-
<pre>
|
252
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 189</span>
|
253
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">captured_as</span>(<span class="ruby-identifier">name</span>)
|
254
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{name}"</span>)
|
255
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">str</span>
|
256
|
-
<span class="ruby-ivar">@_buf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">str</span>
|
257
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
258
|
-
<span class="ruby-keyword kw">end</span>
|
259
|
-
</pre>
|
260
|
-
</div>
|
261
|
-
</div>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
<div id="method-M000011" class="method-detail">
|
265
|
-
<a name="M000011"></a>
|
266
|
-
|
267
|
-
<div class="method-heading">
|
268
|
-
<a href="#M000011" class="method-signature">
|
269
|
-
<span class="method-name">echo</span><span class="method-args">(value)</span>
|
270
|
-
</a>
|
271
|
-
</div>
|
272
|
-
|
273
|
-
<div class="method-description">
|
274
|
-
<p>
|
275
|
-
add value into _buf. this is equivarent to ’#{value}’.
|
276
|
-
</p>
|
277
|
-
<p><a class="source-toggle" href="#"
|
278
|
-
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
279
|
-
<div class="method-source-code" id="M000011-source">
|
280
|
-
<pre>
|
281
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 121</span>
|
282
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">echo</span>(<span class="ruby-identifier">value</span>)
|
283
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_buf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>
|
284
|
-
<span class="ruby-keyword kw">end</span>
|
285
|
-
</pre>
|
286
|
-
</div>
|
287
|
-
</div>
|
288
|
-
</div>
|
289
|
-
|
290
|
-
<div id="method-M000009" class="method-detail">
|
291
|
-
<a name="M000009"></a>
|
292
|
-
|
293
|
-
<div class="method-heading">
|
294
|
-
<a href="#M000009" class="method-signature">
|
295
|
-
<span class="method-name">escape</span><span class="method-args">(val)</span>
|
296
|
-
</a>
|
297
|
-
</div>
|
298
|
-
|
299
|
-
<div class="method-description">
|
300
|
-
<p>
|
301
|
-
<a href="ContextHelper.html#M000009">escape</a> value. this method should
|
302
|
-
be overrided in subclass.
|
303
|
-
</p>
|
304
|
-
<p><a class="source-toggle" href="#"
|
305
|
-
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
306
|
-
<div class="method-source-code" id="M000009-source">
|
307
|
-
<pre>
|
308
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 108</span>
|
309
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">val</span>)
|
310
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>
|
311
|
-
<span class="ruby-keyword kw">end</span>
|
312
|
-
</pre>
|
313
|
-
</div>
|
314
|
-
</div>
|
315
|
-
</div>
|
316
|
-
|
317
|
-
<div id="method-M000010" class="method-detail">
|
318
|
-
<a name="M000010"></a>
|
319
|
-
|
320
|
-
<div class="method-heading">
|
321
|
-
<a href="#M000010" class="method-signature">
|
322
|
-
<span class="method-name">import</span><span class="method-args">(template_name, _append_to_buf=true)</span>
|
323
|
-
</a>
|
324
|
-
</div>
|
325
|
-
|
326
|
-
<div class="method-description">
|
327
|
-
<p>
|
328
|
-
include template. ‘template_name’ can be filename or short
|
329
|
-
name.
|
330
|
-
</p>
|
331
|
-
<p><a class="source-toggle" href="#"
|
332
|
-
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
333
|
-
<div class="method-source-code" id="M000010-source">
|
334
|
-
<pre>
|
335
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 113</span>
|
336
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">import</span>(<span class="ruby-identifier">template_name</span>, <span class="ruby-identifier">_append_to_buf</span>=<span class="ruby-keyword kw">true</span>)
|
337
|
-
<span class="ruby-identifier">_buf</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_buf</span>
|
338
|
-
<span class="ruby-identifier">output</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_engine</span>.<span class="ruby-identifier">render</span>(<span class="ruby-identifier">template_name</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">layout</span>=<span class="ruby-keyword kw">false</span>)
|
339
|
-
<span class="ruby-identifier">_buf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">output</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_append_to_buf</span>
|
340
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">output</span>
|
341
|
-
<span class="ruby-keyword kw">end</span>
|
342
|
-
</pre>
|
343
|
-
</div>
|
344
|
-
</div>
|
345
|
-
</div>
|
346
|
-
|
347
|
-
<div id="method-M000012" class="method-detail">
|
348
|
-
<a name="M000012"></a>
|
349
|
-
|
350
|
-
<div class="method-heading">
|
351
|
-
<a href="#M000012" class="method-signature">
|
352
|
-
<span class="method-name">start_capture</span><span class="method-args">(varname=nil) {|| ...}</span>
|
353
|
-
</a>
|
354
|
-
</div>
|
355
|
-
|
356
|
-
<div class="method-description">
|
357
|
-
<p>
|
358
|
-
start capturing. returns captured string if block given, else return nil.
|
359
|
-
if block is not given, calling <a
|
360
|
-
href="ContextHelper.html#M000013">stop_capture</a>() is required.
|
361
|
-
</p>
|
362
|
-
<p>
|
363
|
-
ex. list.rbhtml
|
364
|
-
</p>
|
365
|
-
<pre>
|
366
|
-
<html><body>
|
367
|
-
<h1><?rb start_capture(:title) do ?>Document Title<?rb end ?></h1>
|
368
|
-
<?rb start_capture(:content) ?>
|
369
|
-
<ul>
|
370
|
-
<?rb for item in list do ?>
|
371
|
-
<li>${item}</li>
|
372
|
-
<?rb end ?>
|
373
|
-
</ul>
|
374
|
-
<?rb stop_capture() ?>
|
375
|
-
</body></html>
|
376
|
-
</pre>
|
377
|
-
<p>
|
378
|
-
ex. layout.rbhtml
|
379
|
-
</p>
|
380
|
-
<pre>
|
381
|
-
<?xml version="1.0" ?>
|
382
|
-
<html xml:lang="en">
|
383
|
-
<head>
|
384
|
-
<title>${@title}</title>
|
385
|
-
</head>
|
386
|
-
<body>
|
387
|
-
<h1>${@title}</h1>
|
388
|
-
<div id="content">
|
389
|
-
<?rb echo(@content) ?>
|
390
|
-
</div>
|
391
|
-
</body>
|
392
|
-
</html>
|
393
|
-
</pre>
|
394
|
-
<p><a class="source-toggle" href="#"
|
395
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
396
|
-
<div class="method-source-code" id="M000012-source">
|
397
|
-
<pre>
|
398
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 156</span>
|
399
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_capture</span>(<span class="ruby-identifier">varname</span>=<span class="ruby-keyword kw">nil</span>)
|
400
|
-
<span class="ruby-ivar">@_capture_varname</span> = <span class="ruby-identifier">varname</span>
|
401
|
-
<span class="ruby-ivar">@_start_position</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_buf</span>.<span class="ruby-identifier">length</span>
|
402
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
403
|
-
<span class="ruby-keyword kw">yield</span>
|
404
|
-
<span class="ruby-identifier">output</span> = <span class="ruby-identifier">stop_capture</span>()
|
405
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">output</span>
|
406
|
-
<span class="ruby-keyword kw">else</span>
|
407
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
408
|
-
<span class="ruby-keyword kw">end</span>
|
409
|
-
<span class="ruby-keyword kw">end</span>
|
410
|
-
</pre>
|
411
|
-
</div>
|
412
|
-
</div>
|
413
|
-
</div>
|
414
|
-
|
415
|
-
<div id="method-M000013" class="method-detail">
|
416
|
-
<a name="M000013"></a>
|
417
|
-
|
418
|
-
<div class="method-heading">
|
419
|
-
<a href="#M000013" class="method-signature">
|
420
|
-
<span class="method-name">stop_capture</span><span class="method-args">(store_to_context=true)</span>
|
421
|
-
</a>
|
422
|
-
</div>
|
423
|
-
|
424
|
-
<div class="method-description">
|
425
|
-
<p>
|
426
|
-
stop capturing. returns captured string. see <a
|
427
|
-
href="ContextHelper.html#M000012">start_capture</a>()’s document.
|
428
|
-
</p>
|
429
|
-
<p><a class="source-toggle" href="#"
|
430
|
-
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
431
|
-
<div class="method-source-code" id="M000013-source">
|
432
|
-
<pre>
|
433
|
-
<span class="ruby-comment cmt"># File lib/tenjin.rb, line 173</span>
|
434
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop_capture</span>(<span class="ruby-identifier">store_to_context</span>=<span class="ruby-keyword kw">true</span>)
|
435
|
-
<span class="ruby-identifier">output</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_buf</span>[<span class="ruby-ivar">@_start_position</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
436
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">_buf</span>[<span class="ruby-ivar">@_start_position</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] = <span class="ruby-value str">''</span>
|
437
|
-
<span class="ruby-ivar">@_start_position</span> = <span class="ruby-keyword kw">nil</span>
|
438
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@_capture_varname</span>
|
439
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{@_capture_varname}"</span>, <span class="ruby-identifier">output</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">store_to_context</span>
|
440
|
-
<span class="ruby-ivar">@_capture_varname</span> = <span class="ruby-keyword kw">nil</span>
|
441
|
-
<span class="ruby-keyword kw">end</span>
|
442
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">output</span>
|
443
|
-
<span class="ruby-keyword kw">end</span>
|
444
|
-
</pre>
|
445
|
-
</div>
|
446
|
-
</div>
|
447
|
-
</div>
|
448
|
-
|
449
|
-
|
450
|
-
</div>
|
451
|
-
|
452
|
-
|
453
|
-
</div>
|
454
|
-
|
455
|
-
|
456
|
-
<div id="validator-badges">
|
457
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
458
|
-
</div>
|
459
|
-
|
460
|
-
</body>
|
461
|
-
</html>
|