Adding some documentation.
[lyrix.git] / doc / app / classes / ShowsHelper.html
blob42ce3b40295d6f635058b65aab5e48b691a80548
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">
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <head>
8 <title>Module: ShowsHelper</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[
15 function popupCode( url ) {
16 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
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;
27 elemStyle = elem.style;
29 if ( elemStyle.display != "block" ) {
30 elemStyle.display = "block"
31 } else {
32 elemStyle.display = "none"
35 return true;
38 // Make codeblocks hidden by default
39 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
41 // ]]>
42 </script>
44 </head>
45 <body>
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">ShowsHelper</td>
54 </tr>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
57 <td>
58 <a href="../files/app/helpers/shows_helper_rb.html">
59 app/helpers/shows_helper.rb
60 </a>
61 <br />
62 </td>
63 </tr>
65 </table>
66 </div>
67 <!-- banner header -->
69 <div id="bodyContent">
73 <div id="contextContent">
77 </div>
79 <div id="method-list">
80 <h3 class="section-bar">Methods</h3>
82 <div class="name-list">
83 <a href="#M000053">lyric_slide</a>&nbsp;&nbsp;
84 </div>
85 </div>
87 </div>
90 <!-- if includes -->
92 <div id="section">
101 <!-- if method_list -->
102 <div id="methods">
103 <h3 class="section-bar">Public Instance methods</h3>
105 <div id="method-M000053" class="method-detail">
106 <a name="M000053"></a>
108 <div class="method-heading">
109 <a href="#M000053" class="method-signature">
110 <span class="method-name">lyric_slide</span><span class="method-args">(slide)</span>
111 </a>
112 </div>
114 <div class="method-description">
115 <p><a class="source-toggle" href="#"
116 onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
117 <div class="method-source-code" id="M000053-source">
118 <pre>
119 <span class="ruby-comment cmt"># File app/helpers/shows_helper.rb, line 2</span>
120 2: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lyric_slide</span>(<span class="ruby-identifier">slide</span>)
121 3: <span class="ruby-identifier">split_slide</span> = <span class="ruby-identifier">slide</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\r\n&quot;</span>, <span class="ruby-value str">&quot;\n&quot;</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
122 4: <span class="ruby-identifier">first_line</span> = <span class="ruby-identifier">split_slide</span>.<span class="ruby-identifier">first</span>
123 5: <span class="ruby-identifier">slide</span> = <span class="ruby-identifier">split_slide</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\r\n&quot;</span>)
125 7: <span class="ruby-identifier">html</span> = <span class="ruby-value str">&quot;&lt;div class='slide lyric_slide'&gt;&quot;</span>
126 8: <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;h1. #{first_line}&quot;</span>).<span class="ruby-identifier">to_html</span>
127 9: <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;div class='lyrics'&gt;&quot;</span>
128 10: <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">slide</span>, [<span class="ruby-identifier">:hard_breaks</span>]).<span class="ruby-identifier">to_html</span>
129 11: <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/div&gt;&lt;/div&gt;&quot;</span>
130 12:
131 13: <span class="ruby-identifier">html</span>
132 14: <span class="ruby-keyword kw">end</span>
133 </pre>
134 </div>
135 </div>
136 </div>
139 </div>
142 </div>
145 <div id="validator-badges">
146 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
147 </div>
149 </body>
150 </html>