1 <?xml version=
"1.0" encoding=
"iso-8859-1"?>
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">
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">
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 );
27 elemStyle = elem.style;
29 if ( elemStyle.display !=
"block" ) {
30 elemStyle.display =
"block"
32 elemStyle.display =
"none"
38 // Make codeblocks hidden by default
39 document.writeln(
"<style type=\"text/css\
">div.method-source-code { display: none }</style>" )
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>
55 <tr class=
"top-aligned-row">
56 <td><strong>In:
</strong></td>
58 <a href=
"../files/app/helpers/shows_helper_rb.html">
59 app/helpers/shows_helper.rb
67 <!-- banner header -->
69 <div id=
"bodyContent">
73 <div id=
"contextContent">
79 <div id=
"method-list">
80 <h3 class=
"section-bar">Methods
</h3>
82 <div class=
"name-list">
83 <a href=
"#M000053">lyric_slide
</a>
101 <!-- if method_list -->
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>
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">
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">"\r\n
"</span>,
<span class=
"ruby-value str">"\n
"</span>).
<span class=
"ruby-identifier">split
</span>(
<span class=
"ruby-value str">"\n
"</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">"\r\n
"</span>)
125 7:
<span class=
"ruby-identifier">html
</span> =
<span class=
"ruby-value str">"<div class='slide lyric_slide'
>"</span>
126 8:
<span class=
"ruby-identifier">html
</span> <span class=
"ruby-operator"><<</span> <span class=
"ruby-constant">RedCloth
</span>.
<span class=
"ruby-identifier">new
</span>(
<span class=
"ruby-node">"h1. #{first_line}
"</span>).
<span class=
"ruby-identifier">to_html
</span>
127 9:
<span class=
"ruby-identifier">html
</span> <span class=
"ruby-operator"><<</span> <span class=
"ruby-value str">"<div class='lyrics'
>"</span>
128 10:
<span class=
"ruby-identifier">html
</span> <span class=
"ruby-operator"><<</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"><<</span> <span class=
"ruby-value str">"</div
></div
>"</span>
131 13:
<span class=
"ruby-identifier">html
</span>
132 14:
<span class=
"ruby-keyword kw">end
</span>
145 <div id=
"validator-badges">
146 <p><small><a href=
"http://validator.w3.org/check/referer">[Validate]
</a></small></p>