]>
Commit | Line | Data |
---|---|---|
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 | Module: Lyricli | |
8 | ||
34d0bf15 | 9 | — Documentation by YARD 0.8.2.1 |
823e558b BB |
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> » | |
35 | ||
36 | ||
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>Module: Lyricli | |
67 | ||
68 | ||
69 | ||
70 | </h1> | |
71 | ||
72 | <dl class="box"> | |
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | <dt class="r1 last">Defined in:</dt> | |
82 | <dd class="r1 last">lib/lyricli.rb<span class="defines">,<br /> | |
34d0bf15 | 83 | lib/lyricli/util.rb,<br /> lib/lyricli/lyricli.rb,<br /> lib/lyricli/sources/rdio.rb,<br /> lib/lyricli/lyrics_engine.rb,<br /> lib/lyricli/configuration.rb,<br /> lib/lyricli/sources/itunes.rb,<br /> lib/lyricli/source_manager.rb,<br /> lib/lyricli/sources/arguments.rb</span> |
823e558b BB |
84 | </dd> |
85 | ||
86 | </dl> | |
87 | <div class="clear"></div> | |
88 | ||
34d0bf15 BB |
89 | <h2>Overview</h2><div class="docstring"> |
90 | <div class="discussion"> | |
91 | <p> | |
92 | The Lyricli module allows you to easily search for lyrics by looking for | |
93 | song and artist data from diverse sources. | |
94 | </p> | |
95 | ||
96 | ||
97 | </div> | |
98 | </div> | |
99 | <div class="tags"> | |
100 | ||
101 | ||
102 | </div><h2>Defined Under Namespace</h2> | |
823e558b BB |
103 | <p class="children"> |
104 | ||
105 | ||
106 | <strong class="modules">Modules:</strong> <span class='object_link'><a href="Lyricli/Sources.html" title="Lyricli::Sources (module)">Sources</a></span>, <span class='object_link'><a href="Lyricli/Util.html" title="Lyricli::Util (module)">Util</a></span> | |
107 | ||
108 | ||
109 | ||
110 | <strong class="classes">Classes:</strong> <span class='object_link'><a href="Lyricli/Configuration.html" title="Lyricli::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Lyricli/Lyricli.html" title="Lyricli::Lyricli (class)">Lyricli</a></span>, <span class='object_link'><a href="Lyricli/LyricsEngine.html" title="Lyricli::LyricsEngine (class)">LyricsEngine</a></span>, <span class='object_link'><a href="Lyricli/SourceManager.html" title="Lyricli::SourceManager (class)">SourceManager</a></span> | |
111 | ||
112 | ||
113 | </p> | |
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | <h2> | |
123 | Class Method Summary | |
124 | <small>(<a href="#" class="summary_toggle">collapse</a>)</small> | |
125 | </h2> | |
126 | ||
127 | <ul class="summary"> | |
128 | ||
129 | <li class="public "> | |
130 | <span class="summary_signature"> | |
131 | ||
34d0bf15 BB |
132 | <a href="#disable-class_method" title="disable (class method)">+ (Object) <strong>disable</strong>(source_name) </a> |
133 | ||
134 | ||
135 | ||
136 | </span> | |
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | <span class="summary_desc"><div class='inline'><p> | |
147 | Disables a source via the Source Manager. | |
148 | </p> | |
149 | </div></span> | |
150 | ||
151 | </li> | |
152 | ||
153 | ||
154 | <li class="public "> | |
155 | <span class="summary_signature"> | |
156 | ||
157 | <a href="#enable-class_method" title="enable (class method)">+ (Object) <strong>enable</strong>(source_name) </a> | |
158 | ||
159 | ||
160 | ||
161 | </span> | |
162 | ||
163 | ||
164 | ||
165 | ||
166 | ||
167 | ||
168 | ||
169 | ||
170 | ||
171 | <span class="summary_desc"><div class='inline'><p> | |
172 | Enables a source via the Source Manager. | |
173 | </p> | |
174 | </div></span> | |
175 | ||
176 | </li> | |
177 | ||
178 | ||
179 | <li class="public "> | |
180 | <span class="summary_signature"> | |
181 | ||
182 | <a href="#lyrics-class_method" title="lyrics (class method)">+ (String) <strong>lyrics</strong> </a> | |
183 | ||
184 | ||
185 | ||
186 | </span> | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | <span class="summary_desc"><div class='inline'><p> | |
197 | Creates a new Lyricli instance and returns lyrics by going through the | |
198 | sources. | |
199 | </p> | |
200 | </div></span> | |
201 | ||
202 | </li> | |
203 | ||
204 | ||
205 | <li class="public "> | |
206 | <span class="summary_signature"> | |
207 | ||
208 | <a href="#reset-class_method" title="reset (class method)">+ (Object) <strong>reset</strong>(source_name) </a> | |
823e558b BB |
209 | |
210 | ||
211 | ||
212 | </span> | |
213 | ||
214 | ||
215 | ||
216 | ||
217 | ||
218 | ||
219 | ||
220 | ||
221 | ||
34d0bf15 BB |
222 | <span class="summary_desc"><div class='inline'><p> |
223 | Resets all configuration for a source via the Source Manager. | |
224 | </p> | |
225 | </div></span> | |
226 | ||
227 | </li> | |
228 | ||
229 | ||
230 | <li class="public "> | |
231 | <span class="summary_signature"> | |
232 | ||
233 | <a href="#sources-class_method" title="sources (class method)">+ (String) <strong>sources</strong> </a> | |
234 | ||
235 | ||
236 | ||
237 | </span> | |
238 | ||
239 | ||
240 | ||
241 | ||
242 | ||
243 | ||
244 | ||
245 | ||
246 | ||
247 | <span class="summary_desc"><div class='inline'><p> | |
248 | Returns a list of the available sources to enable or disable. | |
249 | </p> | |
250 | </div></span> | |
251 | ||
252 | </li> | |
253 | ||
254 | ||
255 | <li class="public "> | |
256 | <span class="summary_signature"> | |
257 | ||
258 | <a href="#version-class_method" title="version (class method)">+ (String) <strong>version</strong> </a> | |
259 | ||
260 | ||
261 | ||
262 | </span> | |
263 | ||
264 | ||
265 | ||
266 | ||
267 | ||
268 | ||
269 | ||
270 | ||
271 | ||
272 | <span class="summary_desc"><div class='inline'><p> | |
273 | Returns the version of the library. | |
274 | </p> | |
275 | </div></span> | |
823e558b BB |
276 | |
277 | </li> | |
278 | ||
279 | ||
280 | </ul> | |
281 | ||
282 | ||
283 | ||
284 | ||
285 | <div id="class_method_details" class="method_details_list"> | |
286 | <h2>Class Method Details</h2> | |
287 | ||
288 | ||
289 | <div class="method_details first"> | |
34d0bf15 | 290 | <h3 class="signature first" id="disable-class_method"> |
823e558b | 291 | |
34d0bf15 | 292 | + (<tt>Object</tt>) <strong>disable</strong>(source_name) |
823e558b BB |
293 | |
294 | ||
295 | ||
296 | ||
297 | ||
34d0bf15 BB |
298 | </h3><div class="docstring"> |
299 | <div class="discussion"> | |
300 | <p> | |
301 | Disables a source via the Source Manager | |
302 | </p> | |
303 | ||
304 | ||
305 | </div> | |
306 | </div> | |
307 | <div class="tags"> | |
308 | ||
309 | ||
310 | </div><table class="source_code"> | |
311 | <tr> | |
312 | <td> | |
313 | <pre class="lines"> | |
314 | ||
315 | ||
316 | 56 | |
317 | 57 | |
318 | 58 | |
319 | 59</pre> | |
320 | </td> | |
321 | <td> | |
322 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 56</span> | |
323 | ||
324 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
325 | <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> | |
326 | <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
327 | <span class='kw'>end</span></pre> | |
328 | </td> | |
329 | </tr> | |
330 | </table> | |
331 | </div> | |
332 | ||
333 | <div class="method_details "> | |
334 | <h3 class="signature " id="enable-class_method"> | |
335 | ||
336 | + (<tt>Object</tt>) <strong>enable</strong>(source_name) | |
337 | ||
338 | ||
339 | ||
340 | ||
341 | ||
342 | </h3><div class="docstring"> | |
343 | <div class="discussion"> | |
344 | <p> | |
345 | Enables a source via the Source Manager | |
346 | </p> | |
347 | ||
348 | ||
349 | </div> | |
350 | </div> | |
351 | <div class="tags"> | |
352 | ||
353 | ||
354 | </div><table class="source_code"> | |
355 | <tr> | |
356 | <td> | |
357 | <pre class="lines"> | |
358 | ||
359 | ||
360 | 50 | |
361 | 51 | |
362 | 52 | |
363 | 53</pre> | |
364 | </td> | |
365 | <td> | |
366 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 50</span> | |
367 | ||
368 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
369 | <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> | |
370 | <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
371 | <span class='kw'>end</span></pre> | |
372 | </td> | |
373 | </tr> | |
374 | </table> | |
375 | </div> | |
376 | ||
377 | <div class="method_details "> | |
378 | <h3 class="signature " id="lyrics-class_method"> | |
379 | ||
380 | + (<tt>String</tt>) <strong>lyrics</strong> | |
381 | ||
382 | ||
383 | ||
384 | ||
385 | ||
386 | </h3><div class="docstring"> | |
387 | <div class="discussion"> | |
388 | <p> | |
389 | Creates a new Lyricli instance and returns lyrics by going through the | |
390 | sources. | |
391 | </p> | |
392 | ||
393 | ||
394 | </div> | |
395 | </div> | |
396 | <div class="tags"> | |
397 | ||
398 | <p class="tag_title">Returns:</p> | |
399 | <ul class="return"> | |
400 | ||
401 | <li> | |
402 | ||
403 | ||
404 | <span class='type'>(<tt>String</tt>)</span> | |
405 | ||
406 | ||
407 | ||
408 | — | |
409 | <div class='inline'><p> | |
410 | the fetched lyrics | |
411 | </p> | |
412 | </div> | |
413 | ||
414 | </li> | |
415 | ||
416 | </ul> | |
417 | ||
418 | </div><table class="source_code"> | |
823e558b BB |
419 | <tr> |
420 | <td> | |
421 | <pre class="lines"> | |
422 | ||
423 | ||
823e558b BB |
424 | 30 |
425 | 31 | |
34d0bf15 BB |
426 | 32 |
427 | 33</pre> | |
823e558b BB |
428 | </td> |
429 | <td> | |
34d0bf15 | 430 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 30</span> |
823e558b | 431 | |
34d0bf15 | 432 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_lyrics'>lyrics</span> |
823e558b BB |
433 | <span class='ivar'>@lyricli</span> <span class='op'>=</span> <span class='const'>Lyricli</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> |
434 | <span class='ivar'>@lyricli</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span> | |
435 | <span class='kw'>end</span></pre> | |
436 | </td> | |
437 | </tr> | |
438 | </table> | |
34d0bf15 BB |
439 | </div> |
440 | ||
441 | <div class="method_details "> | |
442 | <h3 class="signature " id="reset-class_method"> | |
443 | ||
444 | + (<tt>Object</tt>) <strong>reset</strong>(source_name) | |
445 | ||
446 | ||
447 | ||
448 | ||
449 | ||
450 | </h3><div class="docstring"> | |
451 | <div class="discussion"> | |
452 | <p> | |
453 | Resets all configuration for a source via the Source Manager | |
454 | </p> | |
455 | ||
456 | ||
457 | </div> | |
458 | </div> | |
459 | <div class="tags"> | |
460 | ||
461 | ||
462 | </div><table class="source_code"> | |
463 | <tr> | |
464 | <td> | |
465 | <pre class="lines"> | |
466 | ||
467 | ||
468 | 62 | |
469 | 63 | |
470 | 64 | |
471 | 65</pre> | |
472 | </td> | |
473 | <td> | |
474 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 62</span> | |
475 | ||
476 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
477 | <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> | |
478 | <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span> | |
479 | <span class='kw'>end</span></pre> | |
480 | </td> | |
481 | </tr> | |
482 | </table> | |
483 | </div> | |
484 | ||
485 | <div class="method_details "> | |
486 | <h3 class="signature " id="sources-class_method"> | |
487 | ||
488 | + (<tt>String</tt>) <strong>sources</strong> | |
489 | ||
490 | ||
491 | ||
492 | ||
493 | ||
494 | </h3><div class="docstring"> | |
495 | <div class="discussion"> | |
496 | <p> | |
497 | Returns a list of the available sources to enable or disable | |
498 | </p> | |
499 | ||
500 | ||
501 | </div> | |
502 | </div> | |
503 | <div class="tags"> | |
504 | ||
505 | <p class="tag_title">Returns:</p> | |
506 | <ul class="return"> | |
507 | ||
508 | <li> | |
509 | ||
510 | ||
511 | <span class='type'>(<tt>String</tt>)</span> | |
512 | ||
513 | ||
514 | ||
515 | — | |
516 | <div class='inline'><p> | |
517 | the list of available sources. Enabled sources have a star appended. | |
518 | </p> | |
519 | </div> | |
520 | ||
521 | </li> | |
522 | ||
523 | </ul> | |
524 | ||
525 | </div><table class="source_code"> | |
526 | <tr> | |
527 | <td> | |
528 | <pre class="lines"> | |
529 | ||
530 | ||
531 | 44 | |
532 | 45 | |
533 | 46 | |
534 | 47</pre> | |
535 | </td> | |
536 | <td> | |
537 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 44</span> | |
538 | ||
539 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sources'>sources</span> | |
540 | <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> | |
541 | <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_available_sources'>available_sources</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</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> | |
542 | <span class='kw'>end</span></pre> | |
543 | </td> | |
544 | </tr> | |
545 | </table> | |
546 | </div> | |
547 | ||
548 | <div class="method_details "> | |
549 | <h3 class="signature " id="version-class_method"> | |
550 | ||
551 | + (<tt>String</tt>) <strong>version</strong> | |
552 | ||
553 | ||
554 | ||
555 | ||
556 | ||
557 | </h3><div class="docstring"> | |
558 | <div class="discussion"> | |
559 | <p> | |
560 | Returns the version of the library | |
561 | </p> | |
562 | ||
563 | ||
564 | </div> | |
565 | </div> | |
566 | <div class="tags"> | |
567 | ||
568 | <p class="tag_title">Returns:</p> | |
569 | <ul class="return"> | |
570 | ||
571 | <li> | |
572 | ||
573 | ||
574 | <span class='type'>(<tt>String</tt>)</span> | |
575 | ||
576 | ||
577 | ||
578 | — | |
579 | <div class='inline'><p> | |
580 | the version | |
581 | </p> | |
582 | </div> | |
583 | ||
584 | </li> | |
585 | ||
586 | </ul> | |
587 | ||
588 | </div><table class="source_code"> | |
589 | <tr> | |
590 | <td> | |
591 | <pre class="lines"> | |
592 | ||
593 | ||
594 | 37 | |
595 | 38 | |
596 | 39</pre> | |
597 | </td> | |
598 | <td> | |
599 | <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 37</span> | |
600 | ||
601 | <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> | |
602 | <span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lyricli</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> | |
603 | <span class='kw'>end</span></pre> | |
604 | </td> | |
605 | </tr> | |
606 | </table> | |
823e558b BB |
607 | </div> |
608 | ||
609 | </div> | |
610 | ||
611 | </div> | |
612 | ||
613 | <div id="footer"> | |
34d0bf15 | 614 | Generated on Sat Oct 6 02:05:51 2012 by |
823e558b | 615 | <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
34d0bf15 | 616 | 0.8.2.1 (ruby-1.9.2). |
823e558b BB |
617 | </div> |
618 | ||
619 | </body> | |
620 | </html> |