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">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
9 — Documentation by YARD
0.8.2.1
13 <link rel=
"stylesheet" href=
"css/style.css" type=
"text/css" media=
"screen" charset=
"utf-8" />
15 <link rel=
"stylesheet" href=
"css/common.css" type=
"text/css" media=
"screen" charset=
"utf-8" />
17 <script type=
"text/javascript" charset=
"utf-8">
18 hasFrames = window.top.frames.main ? true : false;
20 framesUrl = "frames.html#!" + escape(window.location.href);
24 <script type=
"text/javascript" charset=
"utf-8" src=
"js/jquery.js"></script>
26 <script type=
"text/javascript" charset=
"utf-8" src=
"js/app.js"></script>
34 <a href=
"_index.html">Index (L)
</a> »
37 <span class=
"title">Lyricli
</span>
40 <div class=
"noframes"><span class=
"title">(
</span><a href=
"." target=
"_top">no frames
</a><span class=
"title">)
</span></div>
45 <a class=
"full_list_link" id=
"class_list_link"
46 href=
"class_list.html">
50 <a class=
"full_list_link" id=
"method_list_link"
51 href=
"method_list.html">
55 <a class=
"full_list_link" id=
"file_list_link"
56 href=
"file_list.html">
61 <div class=
"clear"></div>
64 <iframe id=
"search_frame"></iframe>
66 <div id=
"content"><h1>Module: Lyricli
81 <dt class=
"r1 last">Defined in:
</dt>
82 <dd class=
"r1 last">lib/lyricli.rb
<span class=
"defines">,
<br />
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>
87 <div class=
"clear"></div>
89 <h2>Overview
</h2><div class=
"docstring">
90 <div class=
"discussion">
92 The Lyricli module allows you to easily search for lyrics by looking for
93 song and artist data from diverse sources.
102 </div><h2>Defined Under Namespace
</h2>
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>
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>
124 <small>(
<a href=
"#" class=
"summary_toggle">collapse
</a>)
</small>
130 <span class=
"summary_signature">
132 <a href=
"#disable-class_method" title=
"disable (class method)">+ (Object)
<strong>disable
</strong>(source_name)
</a>
146 <span class=
"summary_desc"><div class='inline'
><p>
147 Disables a source via the Source Manager.
155 <span class=
"summary_signature">
157 <a href=
"#enable-class_method" title=
"enable (class method)">+ (Object)
<strong>enable
</strong>(source_name)
</a>
171 <span class=
"summary_desc"><div class='inline'
><p>
172 Enables a source via the Source Manager.
180 <span class=
"summary_signature">
182 <a href=
"#lyrics-class_method" title=
"lyrics (class method)">+ (String)
<strong>lyrics
</strong> </a>
196 <span class=
"summary_desc"><div class='inline'
><p>
197 Creates a new Lyricli instance and returns lyrics by going through the
206 <span class=
"summary_signature">
208 <a href=
"#reset-class_method" title=
"reset (class method)">+ (Object)
<strong>reset
</strong>(source_name)
</a>
222 <span class=
"summary_desc"><div class='inline'
><p>
223 Resets all configuration for a source via the Source Manager.
231 <span class=
"summary_signature">
233 <a href=
"#sources-class_method" title=
"sources (class method)">+ (String)
<strong>sources
</strong> </a>
247 <span class=
"summary_desc"><div class='inline'
><p>
248 Returns a list of the available sources to enable or disable.
256 <span class=
"summary_signature">
258 <a href=
"#version-class_method" title=
"version (class method)">+ (String)
<strong>version
</strong> </a>
272 <span class=
"summary_desc"><div class='inline'
><p>
273 Returns the version of the library.
285 <div id=
"class_method_details" class=
"method_details_list">
286 <h2>Class Method Details
</h2>
289 <div class=
"method_details first">
290 <h3 class=
"signature first" id=
"disable-class_method">
292 + (
<tt>Object
</tt>)
<strong>disable
</strong>(source_name)
298 </h3><div class=
"docstring">
299 <div class=
"discussion">
301 Disables a source via the Source Manager
310 </div><table class=
"source_code">
322 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
56</span>
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>
333 <div class=
"method_details ">
334 <h3 class=
"signature " id=
"enable-class_method">
336 + (
<tt>Object
</tt>)
<strong>enable
</strong>(source_name)
342 </h3><div class=
"docstring">
343 <div class=
"discussion">
345 Enables a source via the Source Manager
354 </div><table class=
"source_code">
366 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
50</span>
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>
377 <div class=
"method_details ">
378 <h3 class=
"signature " id=
"lyrics-class_method">
380 + (
<tt>String
</tt>)
<strong>lyrics
</strong>
386 </h3><div class=
"docstring">
387 <div class=
"discussion">
389 Creates a new Lyricli instance and returns lyrics by going through the
398 <p class=
"tag_title">Returns:
</p>
404 <span class='type'
>(
<tt>String
</tt>)
</span>
409 <div class='inline'
><p>
418 </div><table class=
"source_code">
430 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
30</span>
432 <span class='kw'
>def
</span> <span class='kw'
>self
</span><span class='period'
>.
</span><span class='id identifier rubyid_lyrics'
>lyrics
</span>
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>
441 <div class=
"method_details ">
442 <h3 class=
"signature " id=
"reset-class_method">
444 + (
<tt>Object
</tt>)
<strong>reset
</strong>(source_name)
450 </h3><div class=
"docstring">
451 <div class=
"discussion">
453 Resets all configuration for a source via the Source Manager
462 </div><table class=
"source_code">
474 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
62</span>
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>
485 <div class=
"method_details ">
486 <h3 class=
"signature " id=
"sources-class_method">
488 + (
<tt>String
</tt>)
<strong>sources
</strong>
494 </h3><div class=
"docstring">
495 <div class=
"discussion">
497 Returns a list of the available sources to enable or disable
505 <p class=
"tag_title">Returns:
</p>
511 <span class='type'
>(
<tt>String
</tt>)
</span>
516 <div class='inline'
><p>
517 the list of available sources. Enabled sources have a star appended.
525 </div><table class=
"source_code">
537 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
44</span>
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>
548 <div class=
"method_details ">
549 <h3 class=
"signature " id=
"version-class_method">
551 + (
<tt>String
</tt>)
<strong>version
</strong>
557 </h3><div class=
"docstring">
558 <div class=
"discussion">
560 Returns the version of the library
568 <p class=
"tag_title">Returns:
</p>
574 <span class='type'
>(
<tt>String
</tt>)
</span>
579 <div class='inline'
><p>
588 </div><table class=
"source_code">
599 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli.rb', line
37</span>
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>
614 Generated on Sat Oct
6 02:
05:
51 2012 by
615 <a href=
"http://yardoc.org" title=
"Yay! A Ruby Documentation Tool" target=
"_parent">yard
</a>
616 0.8.2.1 (ruby-
1.9.2).