]> git.r.bdr.sh - rbdr/lyricli.rb/blame - doc/Lyricli/Lyricli.html
Integrates iTunes source
[rbdr/lyricli.rb] / doc / Lyricli / Lyricli.html
CommitLineData
823e558b
BB
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 Class: Lyricli::Lyricli
8
9 &mdash; 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 (L)</a> &raquo;
35 <span class='title'><span class='object_link'><a href="../Lyricli.html" title="Lyricli (module)">Lyricli</a></span></span>
36 &raquo;
37 <span class="title">Lyricli</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>Class: Lyricli::Lyricli
67
68
69
70</h1>
71
72<dl class="box">
73
74 <dt class="r1">Inherits:</dt>
75 <dd class="r1">
76 <span class="inheritName">Object</span>
77
78 <ul class="fullTree">
79 <li>Object</li>
80
81 <li class="next">Lyricli::Lyricli</li>
82
83 </ul>
84 <a href="#" class="inheritanceTree">show all</a>
85
86 </dd>
87
88
89
90
91
92
93
94
95
96 <dt class="r2 last">Defined in:</dt>
97 <dd class="r2 last">lib/lyricli.rb</dd>
98
99</dl>
100<div class="clear"></div>
101
102
103
104
105
106
107
108
109
110 <h2>
111 Instance Method Summary
112 <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113 </h2>
114
115 <ul class="summary">
116
117 <li class="public ">
118 <span class="summary_signature">
119
120 <a href="#check_params-instance_method" title="#check_params (instance method)">- (Object) <strong>check_params</strong> </a>
121
122
123
124 </span>
125
126
127
128
129
130
131
132
133
134 <span class="summary_desc"><div class='inline'></div></span>
135
136</li>
137
138
139 <li class="public ">
140 <span class="summary_signature">
141
142 <a href="#exit_with_error-instance_method" title="#exit_with_error (instance method)">- (Object) <strong>exit_with_error</strong> </a>
143
144
145
146 </span>
147
148
149
150
151
152
153
154
155
156 <span class="summary_desc"><div class='inline'></div></span>
157
158</li>
159
160
161 <li class="public ">
162 <span class="summary_signature">
163
164 <a href="#get_lyrics-instance_method" title="#get_lyrics (instance method)">- (Object) <strong>get_lyrics</strong> </a>
165
166
167
168 </span>
169
170
171
172
173
174
175
176
177
178 <span class="summary_desc"><div class='inline'></div></span>
179
180</li>
181
182
183 <li class="public ">
184 <span class="summary_signature">
185
186 <a href="#initialize-instance_method" title="#initialize (instance method)">- (Lyricli) <strong>initialize</strong> </a>
187
188
189
190 </span>
191
192
193 <span class="note title constructor">constructor</span>
194
195
196
197
198
199
200
201
202 <span class="summary_desc"><div class='inline'><p>
203A new instance of Lyricli.
204</p>
205</div></span>
206
207</li>
208
209
210 <li class="public ">
211 <span class="summary_signature">
212
213 <a href="#set_current_track-instance_method" title="#set_current_track (instance method)">- (Object) <strong>set_current_track</strong> </a>
214
215
216
217 </span>
218
219
220
221
222
223
224
225
226
227 <span class="summary_desc"><div class='inline'></div></span>
228
229</li>
230
231
232 </ul>
233
234
235<div id="constructor_details" class="method_details_list">
236 <h2>Constructor Details</h2>
237
238 <div class="method_details first">
239 <h3 class="signature first" id="initialize-instance_method">
240
241 - (<tt><span class='object_link'><a href="" title="Lyricli::Lyricli (class)">Lyricli</a></span></tt>) <strong>initialize</strong>
242
243
244
245
246
247</h3><div class="docstring">
248 <div class="discussion">
249 <p>
250A new instance of Lyricli
251</p>
252
253
254 </div>
255</div>
256<div class="tags">
257
258
259</div><table class="source_code">
260 <tr>
261 <td>
262 <pre class="lines">
263
264
26536
26637
26738</pre>
268 </td>
269 <td>
270 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 36</span>
271
272<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
273 <span class='ivar'>@source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
274<span class='kw'>end</span></pre>
275 </td>
276 </tr>
277</table>
278</div>
279
280</div>
281
282
283 <div id="instance_method_details" class="method_details_list">
284 <h2>Instance Method Details</h2>
285
286
287 <div class="method_details first">
288 <h3 class="signature first" id="check_params-instance_method">
289
290 - (<tt>Object</tt>) <strong>check_params</strong>
291
292
293
294
295
296</h3><table class="source_code">
297 <tr>
298 <td>
299 <pre class="lines">
300
301
30261
30362
30463
30564</pre>
306 </td>
307 <td>
308 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 61</span>
309
310<span class='kw'>def</span> <span class='id identifier rubyid_check_params'>check_params</span>
311 <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exit_with_error'>exit_with_error</span> <span class='kw'>if</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
312 <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exit_with_error'>exit_with_error</span> <span class='kw'>if</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
313<span class='kw'>end</span></pre>
314 </td>
315 </tr>
316</table>
317</div>
318
319 <div class="method_details ">
320 <h3 class="signature " id="exit_with_error-instance_method">
321
322 - (<tt>Object</tt>) <strong>exit_with_error</strong>
323
324
325
326
327
328</h3><table class="source_code">
329 <tr>
330 <td>
331 <pre class="lines">
332
333
33440
33541
33642</pre>
337 </td>
338 <td>
339 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 40</span>
340
341<span class='kw'>def</span> <span class='id identifier rubyid_exit_with_error'>exit_with_error</span>
342 <span class='id identifier rubyid_abort'>abort</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Usage: </span><span class='embexpr_beg'>#{</span><span class='gvar'>$0</span><span class='rbrace'>}</span><span class='tstring_content'> artist song</span><span class='tstring_end'>&quot;</span></span>
343<span class='kw'>end</span></pre>
344 </td>
345 </tr>
346</table>
347</div>
348
349 <div class="method_details ">
350 <h3 class="signature " id="get_lyrics-instance_method">
351
352 - (<tt>Object</tt>) <strong>get_lyrics</strong>
353
354
355
356
357
358</h3><table class="source_code">
359 <tr>
360 <td>
361 <pre class="lines">
362
363
36444
36545
36646
36747
36848
36949
37050
37151
37252
37353
37454
37555</pre>
376 </td>
377 <td>
378 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 44</span>
379
380<span class='kw'>def</span> <span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
381 <span class='id identifier rubyid_set_current_track'>set_current_track</span>
382 <span class='id identifier rubyid_check_params'>check_params</span>
383
384 <span class='id identifier rubyid_engine'>engine</span> <span class='op'>=</span> <span class='const'>LyricsEngine</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='rparen'>)</span>
385
386 <span class='kw'>begin</span>
387 <span class='id identifier rubyid_engine'>engine</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
388 <span class='kw'>rescue</span> <span class='const'>LyricsNotFoundException</span>
389 <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Lyrics not found :(</span><span class='tstring_end'>&quot;</span></span>
390 <span class='kw'>end</span>
391<span class='kw'>end</span></pre>
392 </td>
393 </tr>
394</table>
395</div>
396
397 <div class="method_details ">
398 <h3 class="signature " id="set_current_track-instance_method">
399
400 - (<tt>Object</tt>) <strong>set_current_track</strong>
401
402
403
404
405
406</h3><table class="source_code">
407 <tr>
408 <td>
409 <pre class="lines">
410
411
41257
41358
41459</pre>
415 </td>
416 <td>
417 <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 57</span>
418
419<span class='kw'>def</span> <span class='id identifier rubyid_set_current_track'>set_current_track</span>
420 <span class='ivar'>@current_track</span> <span class='op'>=</span> <span class='ivar'>@source_manager</span><span class='period'>.</span><span class='id identifier rubyid_current_track'>current_track</span>
421<span class='kw'>end</span></pre>
422 </td>
423 </tr>
424</table>
425</div>
426
427 </div>
428
429</div>
430
431 <div id="footer">
432 Generated on Fri Oct 5 22:31:14 2012 by
433 <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
434 0.8.1 (ruby-1.9.2).
435</div>
436
437 </body>
438</html>