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" />
7 Class: Lyricli::Sources::Arguments
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 (A)
</a> »
35 <span class='title'
><span class='object_link'
><a href=
"../../Lyricli.html" title=
"Lyricli (module)">Lyricli
</a></span></span> » <span class='title'
><span class='object_link'
><a href=
"../Sources.html" title=
"Lyricli::Sources (module)">Sources
</a></span></span>
37 <span class=
"title">Arguments
</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>Class: Lyricli::Sources::Arguments
74 <dt class=
"r1">Inherits:
</dt>
76 <span class=
"inheritName">Object
</span>
81 <li class=
"next">Lyricli::Sources::Arguments
</li>
84 <a href=
"#" class=
"inheritanceTree">show all
</a>
96 <dt class=
"r2 last">Defined in:
</dt>
97 <dd class=
"r2 last">lib/lyricli/sources/arguments.rb
</dd>
100 <div class=
"clear"></div>
102 <h2>Overview
</h2><div class=
"docstring">
103 <div class=
"discussion">
105 The arguments source. This one is special since it expects two arguments.
106 It is treated specially by the SourceManager.
119 <h2>Class Attribute Summary
<small>(
<a href=
"#" class=
"summary_toggle">collapse
</a>)
</small></h2>
123 <span class=
"summary_signature">
125 <a href=
"#name-class_method" title=
"name (class method)">+ (Object)
<strong>name
</strong> </a>
142 <span class=
"summary_desc"><div class='inline'
><p>
143 Returns the value of attribute name.
158 <small>(
<a href=
"#" class=
"summary_toggle">collapse
</a>)
</small>
164 <span class=
"summary_signature">
166 <a href=
"#enable-class_method" title=
"enable (class method)">+ (Object)
<strong>enable
</strong> </a>
180 <span class=
"summary_desc"><div class='inline'
><p>
181 The enable method should run all of the tasks needed to validate the
190 <span class=
"summary_signature">
192 <a href=
"#reset-class_method" title=
"reset (class method)">+ (Object)
<strong>reset
</strong> </a>
206 <span class=
"summary_desc"><div class='inline'
><p>
207 The reset method resets any configurations it may have.
217 Instance Method Summary
218 <small>(
<a href=
"#" class=
"summary_toggle">collapse
</a>)
</small>
224 <span class=
"summary_signature">
226 <a href=
"#current_track-instance_method" title=
"#current_track (instance method)">- (Hash)
<strong>current_track
</strong> </a>
240 <span class=
"summary_desc"><div class='inline'
><p>
241 The current_track method should return the name of the current artist and
250 <span class=
"summary_signature">
252 <a href=
"#initialize-instance_method" title=
"#initialize (instance method)">- (Arguments)
<strong>initialize
</strong> </a>
259 <span class=
"note title constructor">constructor
</span>
268 <span class=
"summary_desc"><div class='inline'
><p>
269 Instantiates everything it needs to run.
279 <div id=
"constructor_details" class=
"method_details_list">
280 <h2>Constructor Details
</h2>
282 <div class=
"method_details first">
283 <h3 class=
"signature first" id=
"initialize-instance_method">
285 - (
<tt><span class='object_link'
><a href=
"" title=
"Lyricli::Sources::Arguments (class)">Arguments
</a></span></tt>)
<strong>initialize
</strong>
291 </h3><div class=
"docstring">
292 <div class=
"discussion">
294 Instantiates everything it needs to run.
303 </div><table class=
"source_code">
314 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/sources/arguments.rb', line
20</span>
316 <span class='kw'
>def
</span> <span class='id identifier rubyid_initialize'
>initialize
</span>
317 <span class='comment'
># Nothing to do.
318 </span><span class='kw'
>end
</span></pre>
326 <div id=
"class_attr_details" class=
"attr_details">
327 <h2>Class Attribute Details
</h2>
330 <span id=
"name=-class_method"></span>
331 <div class=
"method_details first">
332 <h3 class=
"signature first" id=
"name-class_method">
334 + (
<tt>Object
</tt>)
<strong>name
</strong>
340 </h3><div class=
"docstring">
341 <div class=
"discussion">
343 Returns the value of attribute name
352 </div><table class=
"source_code">
363 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/sources/arguments.rb', line
8</span>
365 <span class='kw'
>def
</span> <span class='id identifier rubyid_name'
>name
</span>
366 <span class='ivar'
>@name
</span>
367 <span class='kw'
>end
</span></pre>
376 <div id=
"class_method_details" class=
"method_details_list">
377 <h2>Class Method Details
</h2>
380 <div class=
"method_details first">
381 <h3 class=
"signature first" id=
"enable-class_method">
383 + (
<tt>Object
</tt>)
<strong>enable
</strong>
389 </h3><div class=
"docstring">
390 <div class=
"discussion">
392 The enable method should run all of the tasks needed to validate the
393 source. In the case of Rdio it has to authenticate with OAuth.
402 </div><table class=
"source_code">
413 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/sources/arguments.rb', line
15</span>
415 <span class='kw'
>def
</span> <span class='kw'
>self
</span><span class='period'
>.
</span><span class='id identifier rubyid_enable'
>enable
</span>
416 <span class='comment'
># Nothing to do.
417 </span><span class='kw'
>end
</span></pre>
423 <div class=
"method_details ">
424 <h3 class=
"signature " id=
"reset-class_method">
426 + (
<tt>Object
</tt>)
<strong>reset
</strong>
432 </h3><div class=
"docstring">
433 <div class=
"discussion">
435 The reset method resets any configurations it may have
444 </div><table class=
"source_code">
455 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/sources/arguments.rb', line
34</span>
457 <span class='kw'
>def
</span> <span class='kw'
>self
</span><span class='period'
>.
</span><span class='id identifier rubyid_reset'
>reset
</span>
458 <span class='comment'
># Reset Code
459 </span><span class='kw'
>end
</span></pre>
467 <div id=
"instance_method_details" class=
"method_details_list">
468 <h2>Instance Method Details
</h2>
471 <div class=
"method_details first">
472 <h3 class=
"signature first" id=
"current_track-instance_method">
474 - (
<tt>Hash
</tt>)
<strong>current_track
</strong>
480 </h3><div class=
"docstring">
481 <div class=
"discussion">
483 The current_track method should return the name of the current artist and
492 <p class=
"tag_title">Returns:
</p>
498 <span class='type'
>(
<tt>Hash
</tt>)
</span>
503 <div class='inline'
><p>
504 A hash containing the current `:song` and `:artist`.
512 </div><table class=
"source_code">
525 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/sources/arguments.rb', line
27</span>
527 <span class='kw'
>def
</span> <span class='id identifier rubyid_current_track'
>current_track
</span>
528 <span class='id identifier rubyid_artist'
>artist
</span> <span class='op'
>=
</span> <span class='const'
>ARGV
</span><span class='lbracket'
>[
</span><span class='int'
>0</span><span class='rbracket'
>]
</span>
529 <span class='id identifier rubyid_song'
>song
</span> <span class='op'
>=
</span> <span class='const'
>ARGV
</span><span class='lbracket'
>[
</span><span class='int'
>1</span><span class='rbracket'
>]
</span>
530 <span class='lbrace'
>{
</span><span class='label'
>artist:
</span> <span class='id identifier rubyid_artist'
>artist
</span><span class='comma'
>,
</span> <span class='label'
>song:
</span> <span class='id identifier rubyid_song'
>song
</span><span class='rbrace'
>}
</span>
531 <span class='kw'
>end
</span></pre>
542 Generated on Sat Oct
6 03:
20:
24 2012 by
543 <a href=
"http://yardoc.org" title=
"Yay! A Ruby Documentation Tool" target=
"_parent">yard
</a>
544 0.8.2.1 (ruby-
1.9.2).