~ubuntu-branches/ubuntu/saucy/ruby-erubis/saucy

« back to all changes in this revision

Viewing changes to doc-api/classes/Erubis/PercentLineEnhancer.html

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2012-01-26 15:15:58 UTC
  • Revision ID: package-import@ubuntu.com-20120126151558-9u7mnf9ooqnw3bwz
Tags: upstream-2.7.0
ImportĀ upstreamĀ versionĀ 2.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: Erubis::PercentLineEnhancer</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">Erubis::PercentLineEnhancer</td>
 
54
        </tr>
 
55
        <tr class="top-aligned-row">
 
56
            <td><strong>In:</strong></td>
 
57
            <td>
 
58
                <a href="../../files/erubis/enhancer_rb.html">
 
59
                erubis/enhancer.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
regards lines starting with &#8217;%&#8217; as program code
 
78
</p>
 
79
<p>
 
80
this is for compatibility to eruby and <a href="../ERB.html">ERB</a>.
 
81
</p>
 
82
<p>
 
83
this is language-independent.
 
84
</p>
 
85
 
 
86
    </div>
 
87
 
 
88
 
 
89
   </div>
 
90
 
 
91
    <div id="method-list">
 
92
      <h3 class="section-bar">Methods</h3>
 
93
 
 
94
      <div class="name-list">
 
95
      <a href="#M000176">add_text</a>&nbsp;&nbsp;
 
96
      </div>
 
97
    </div>
 
98
 
 
99
  </div>
 
100
 
 
101
 
 
102
    <!-- if includes -->
 
103
    <div id="includes">
 
104
      <h3 class="section-bar">Included Modules</h3>
 
105
 
 
106
      <div id="includes-list">
 
107
        <span class="include-name"><a href="PrefixedLineEnhancer.html">PrefixedLineEnhancer</a></span>
 
108
      </div>
 
109
    </div>
 
110
 
 
111
    <div id="section">
 
112
 
 
113
 
 
114
 
 
115
 
 
116
 
 
117
      
 
118
 
 
119
 
 
120
    <!-- if method_list -->
 
121
    <div id="methods">
 
122
      <h3 class="section-bar">Public Instance methods</h3>
 
123
 
 
124
      <div id="method-M000176" class="method-detail">
 
125
        <a name="M000176"></a>
 
126
 
 
127
        <div class="method-heading">
 
128
          <a href="#M000176" class="method-signature">
 
129
          <span class="method-name">add_text</span><span class="method-args">(src, text)</span>
 
130
          </a>
 
131
        </div>
 
132
      
 
133
        <div class="method-description">
 
134
          <p><a class="source-toggle" href="#"
 
135
            onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
 
136
          <div class="method-source-code" id="M000176-source">
 
137
<pre>
 
138
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 516</span>
 
139
    <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>)
 
140
      <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@prefixrexp</span>
 
141
        <span class="ruby-ivar">@prefixchar</span> = <span class="ruby-value str">'%'</span>
 
142
        <span class="ruby-ivar">@prefixrexp</span> = <span class="ruby-regexp re">/^\%(.*?\r?\n)/</span>
 
143
      <span class="ruby-keyword kw">end</span>
 
144
      <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
 
145
    <span class="ruby-keyword kw">end</span>
 
146
</pre>
 
147
          </div>
 
148
        </div>
 
149
      </div>
 
150
 
 
151
 
 
152
    </div>
 
153
 
 
154
 
 
155
  </div>
 
156
 
 
157
 
 
158
<div id="validator-badges">
 
159
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
 
160
</div>
 
161
 
 
162
</body>
 
163
</html>
 
 
b'\\ No newline at end of file'