+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+ Class: Lyricli::Sources::Itunes
+
+ — Documentation by YARD 0.8.2.1
+
+</title>
+
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
+
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
+
+<script type="text/javascript" charset="utf-8">
+ hasFrames = window.top.frames.main ? true : false;
+ relpath = '../../';
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
+</script>
+
+
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
+
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
+
+
+ </head>
+ <body>
+ <div id="header">
+ <div id="menu">
+
+ <a href="../../_index.html">Index (I)</a> »
+ <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>
+ »
+ <span class="title">Itunes</span>
+
+
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
+</div>
+
+ <div id="search">
+
+ <a class="full_list_link" id="class_list_link"
+ href="../../class_list.html">
+ Class List
+ </a>
+
+ <a class="full_list_link" id="method_list_link"
+ href="../../method_list.html">
+ Method List
+ </a>
+
+ <a class="full_list_link" id="file_list_link"
+ href="../../file_list.html">
+ File List
+ </a>
+
+</div>
+ <div class="clear"></div>
+ </div>
+
+ <iframe id="search_frame"></iframe>
+
+ <div id="content"><h1>Class: Lyricli::Sources::Itunes
+
+
+
+</h1>
+
+<dl class="box">
+
+ <dt class="r1">Inherits:</dt>
+ <dd class="r1">
+ <span class="inheritName">Object</span>
+
+ <ul class="fullTree">
+ <li>Object</li>
+
+ <li class="next">Lyricli::Sources::Itunes</li>
+
+ </ul>
+ <a href="#" class="inheritanceTree">show all</a>
+
+ </dd>
+
+
+
+
+
+
+
+
+
+ <dt class="r2 last">Defined in:</dt>
+ <dd class="r2 last">lib/lyricli/sources/itunes.rb</dd>
+
+</dl>
+<div class="clear"></div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+ <p>
+The source for iTunes
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+ <h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#name-class_method" title="name (class method)">+ (Object) <strong>name</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+Returns the value of attribute name.
+</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#enable-class_method" title="enable (class method)">+ (Object) <strong>enable</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+The enable method should run all of the tasks needed to validate the
+source.
+</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#reset-class_method" title="reset (class method)">+ (Object) <strong>reset</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+The reset method resets any configurations it may have.
+</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+ <h2>
+ Instance Method Summary
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#current_track-instance_method" title="#current_track (instance method)">- (Hash) <strong>current_track</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+The current_track method should return the name of the current artist and
+song.
+</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Itunes) <strong>initialize</strong> </a>
+
+
+
+ </span>
+
+
+ <span class="note title constructor">constructor</span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>
+Instantiates everything it needs to run.
+</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+<div id="constructor_details" class="method_details_list">
+ <h2>Constructor Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="initialize-instance_method">
+
+ - (<tt><span class='object_link'><a href="" title="Lyricli::Sources::Itunes (class)">Itunes</a></span></tt>) <strong>initialize</strong>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+Instantiates everything it needs to run.
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+19
+20
+21
+22</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/sources/itunes.rb', line 19</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
+ <span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
+ <span class='ivar'>@script</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>current_song.scpt</span><span class='tstring_end'>"</span></span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+</div>
+
+ <div id="class_attr_details" class="attr_details">
+ <h2>Class Attribute Details</h2>
+
+
+ <span id="name=-class_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="name-class_method">
+
+ + (<tt>Object</tt>) <strong>name</strong>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+Returns the value of attribute name
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+7
+8
+9</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/sources/itunes.rb', line 7</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
+ <span class='ivar'>@name</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="enable-class_method">
+
+ + (<tt>Object</tt>) <strong>enable</strong>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+The enable method should run all of the tasks needed to validate the
+source. In the case of Rdio it has to authenticate with OAuth.
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+14
+15
+16</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/sources/itunes.rb', line 14</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span>
+ <span class='comment'># Nothing to do
+</span><span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="reset-class_method">
+
+ + (<tt>Object</tt>) <strong>reset</strong>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+The reset method resets any configurations it may have
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+36
+37
+38</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/sources/itunes.rb', line 36</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span>
+ <span class='comment'># Nothing to do
+</span><span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+ <div id="instance_method_details" class="method_details_list">
+ <h2>Instance Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="current_track-instance_method">
+
+ - (<tt>Hash</tt>) <strong>current_track</strong>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+The current_track method should return the name of the current artist and
+song.
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>
+A hash containing the current `:song` and `:artist`.
+</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+27
+28
+29
+30
+31
+32
+33</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/sources/itunes.rb', line 27</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_current_track'>current_track</span>
+ <span class='id identifier rubyid_path_root'>path_root</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_path_root'>path_root</span><span class='comma'>,</span> <span class='ivar'>@script</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_current'>current</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>osascript </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>`</span></span>
+ <span class='id identifier rubyid_current'>current</span> <span class='op'>=</span> <span class='id identifier rubyid_current'>current</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'><-SEP-></span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
+ <span class='lbrace'>{</span><span class='label'>artist:</span> <span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>song:</span> <span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Sat Oct 6 02:34:27 2012 by
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+ 0.8.2.1 (ruby-1.9.2).
+</div>
+
+ </body>
+</html>
\ No newline at end of file