]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
4 | <head> | |
5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
6 | <title> | |
7 | Module: Lyricli::Util | |
8 | ||
9 | — Documentation by YARD 0.8.1 | |
10 | ||
11 | </title> | |
12 | ||
13 | <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> | |
14 | ||
15 | <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> | |
16 | ||
17 | <script type="text/javascript" charset="utf-8"> | |
18 | hasFrames = window.top.frames.main ? true : false; | |
19 | relpath = '../'; | |
20 | framesUrl = "../frames.html#!" + escape(window.location.href); | |
21 | </script> | |
22 | ||
23 | ||
24 | <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> | |
25 | ||
26 | <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> | |
27 | ||
28 | ||
29 | </head> | |
30 | <body> | |
31 | <div id="header"> | |
32 | <div id="menu"> | |
33 | ||
34 | <a href="../_index.html">Index (U)</a> » | |
35 | <span class='title'><span class='object_link'><a href="../Lyricli.html" title="Lyricli (module)">Lyricli</a></span></span> | |
36 | » | |
37 | <span class="title">Util</span> | |
38 | ||
39 | ||
40 | <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> | |
41 | </div> | |
42 | ||
43 | <div id="search"> | |
44 | ||
45 | <a class="full_list_link" id="class_list_link" | |
46 | href="../class_list.html"> | |
47 | Class List | |
48 | </a> | |
49 | ||
50 | <a class="full_list_link" id="method_list_link" | |
51 | href="../method_list.html"> | |
52 | Method List | |
53 | </a> | |
54 | ||
55 | <a class="full_list_link" id="file_list_link" | |
56 | href="../file_list.html"> | |
57 | File List | |
58 | </a> | |
59 | ||
60 | </div> | |
61 | <div class="clear"></div> | |
62 | </div> | |
63 | ||
64 | <iframe id="search_frame"></iframe> | |
65 | ||
66 | <div id="content"><h1>Module: Lyricli::Util | |
67 | ||
68 | ||
69 | ||
70 | </h1> | |
71 | ||
72 | <dl class="box"> | |
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | <dt class="r1">Included in:</dt> | |
81 | <dd class="r1"><span class='object_link'><a href="LyricsEngine.html" title="Lyricli::LyricsEngine (class)">LyricsEngine</a></span>, <span class='object_link'><a href="SourceManager.html" title="Lyricli::SourceManager (class)">SourceManager</a></span></dd> | |
82 | ||
83 | ||
84 | ||
85 | <dt class="r2 last">Defined in:</dt> | |
86 | <dd class="r2 last">lib/lyricli/util.rb</dd> | |
87 | ||
88 | </dl> | |
89 | <div class="clear"></div> | |
90 | ||
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | <h2> | |
100 | Instance Method Summary | |
101 | <small>(<a href="#" class="summary_toggle">collapse</a>)</small> | |
102 | </h2> | |
103 | ||
104 | <ul class="summary"> | |
105 | ||
106 | <li class="public "> | |
107 | <span class="summary_signature"> | |
108 | ||
109 | <a href="#camelize-instance_method" title="#camelize (instance method)">- (Object) <strong>camelize</strong>(str) </a> | |
110 | ||
111 | ||
112 | ||
113 | </span> | |
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | <span class="summary_desc"><div class='inline'></div></span> | |
124 | ||
125 | </li> | |
126 | ||
127 | ||
128 | <li class="public "> | |
129 | <span class="summary_signature"> | |
130 | ||
131 | <a href="#parse_class-instance_method" title="#parse_class (instance method)">- (Object) <strong>parse_class</strong>(class_name) </a> | |
132 | ||
133 | ||
134 | ||
135 | </span> | |
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | <span class="summary_desc"><div class='inline'></div></span> | |
146 | ||
147 | </li> | |
148 | ||
149 | ||
150 | <li class="public "> | |
151 | <span class="summary_signature"> | |
152 | ||
153 | <a href="#sanitize_param-instance_method" title="#sanitize_param (instance method)">- (Object) <strong>sanitize_param</strong>(p) </a> | |
154 | ||
155 | ||
156 | ||
157 | </span> | |
158 | ||
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | ||
166 | ||
167 | <span class="summary_desc"><div class='inline'></div></span> | |
168 | ||
169 | </li> | |
170 | ||
171 | ||
172 | </ul> | |
173 | ||
174 | ||
175 | ||
176 | ||
177 | <div id="instance_method_details" class="method_details_list"> | |
178 | <h2>Instance Method Details</h2> | |
179 | ||
180 | ||
181 | <div class="method_details first"> | |
182 | <h3 class="signature first" id="camelize-instance_method"> | |
183 | ||
184 | - (<tt>Object</tt>) <strong>camelize</strong>(str) | |
185 | ||
186 | ||
187 | ||
188 | ||
189 | ||
190 | </h3><table class="source_code"> | |
191 | <tr> | |
192 | <td> | |
193 | <pre class="lines"> | |
194 | ||
195 | ||
196 | 3 | |
197 | 4 | |
198 | 5</pre> | |
199 | </td> | |
200 | <td> | |
201 | <pre class="code"><span class="info file"># File 'lib/lyricli/util.rb', line 3</span> | |
202 | ||
203 | <span class='kw'>def</span> <span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span> | |
204 | <span class='id identifier rubyid_str'>str</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='id identifier rubyid_w'>w</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> | |
205 | <span class='kw'>end</span></pre> | |
206 | </td> | |
207 | </tr> | |
208 | </table> | |
209 | </div> | |
210 | ||
211 | <div class="method_details "> | |
212 | <h3 class="signature " id="parse_class-instance_method"> | |
213 | ||
214 | - (<tt>Object</tt>) <strong>parse_class</strong>(class_name) | |
215 | ||
216 | ||
217 | ||
218 | ||
219 | ||
220 | </h3><table class="source_code"> | |
221 | <tr> | |
222 | <td> | |
223 | <pre class="lines"> | |
224 | ||
225 | ||
226 | 7 | |
227 | 8 | |
228 | 9 | |
229 | 10 | |
230 | 11 | |
231 | 12 | |
232 | 13 | |
233 | 14</pre> | |
234 | </td> | |
235 | <td> | |
236 | <pre class="code"><span class="info file"># File 'lib/lyricli/util.rb', line 7</span> | |
237 | ||
238 | <span class='kw'>def</span> <span class='id identifier rubyid_parse_class'>parse_class</span><span class='lparen'>(</span><span class='id identifier rubyid_class_name'>class_name</span><span class='rparen'>)</span> | |
239 | <span class='kw'>begin</span> | |
240 | <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sources::</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> | |
241 | <span class='kw'>return</span> <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> | |
242 | <span class='kw'>rescue</span> <span class='const'>NameError</span> | |
243 | <span class='kw'>return</span> <span class='kw'>nil</span> | |
244 | <span class='kw'>end</span> | |
245 | <span class='kw'>end</span></pre> | |
246 | </td> | |
247 | </tr> | |
248 | </table> | |
249 | </div> | |
250 | ||
251 | <div class="method_details "> | |
252 | <h3 class="signature " id="sanitize_param-instance_method"> | |
253 | ||
254 | - (<tt>Object</tt>) <strong>sanitize_param</strong>(p) | |
255 | ||
256 | ||
257 | ||
258 | ||
259 | ||
260 | </h3><table class="source_code"> | |
261 | <tr> | |
262 | <td> | |
263 | <pre class="lines"> | |
264 | ||
265 | ||
266 | 16 | |
267 | 17 | |
268 | 18</pre> | |
269 | </td> | |
270 | <td> | |
271 | <pre class="code"><span class="info file"># File 'lib/lyricli/util.rb', line 16</span> | |
272 | ||
273 | <span class='kw'>def</span> <span class='id identifier rubyid_sanitize_param'>sanitize_param</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span> | |
274 | <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode_www_form_component'>encode_www_form_component</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'> </span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>+</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%2B</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>+</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> | |
275 | <span class='kw'>end</span></pre> | |
276 | </td> | |
277 | </tr> | |
278 | </table> | |
279 | </div> | |
280 | ||
281 | </div> | |
282 | ||
283 | </div> | |
284 | ||
285 | <div id="footer"> | |
286 | Generated on Fri Oct 5 22:31:14 2012 by | |
287 | <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> | |
288 | 0.8.1 (ruby-1.9.2). | |
289 | </div> | |
290 | ||
291 | </body> | |
292 | </html> |