+ <li>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>
+the current track, has an `:artist` and `:song` key.
+</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/lyricli/source_manager.rb', line 80</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_current_track'>current_track</span>
+ <span class='id identifier rubyid_track'>track</span> <span class='op'>=</span> <span class='kw'>nil</span>
+ <span class='id identifier rubyid_lock'>lock</span> <span class='op'>=</span> <span class='kw'>false</span>
+ <span class='ivar'>@enabled_sources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_source'>source</span><span class='op'>|</span>
+ <span class='kw'>begin</span>
+ <span class='id identifier rubyid_current_track'>current_track</span> <span class='op'>=</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_current_track'>current_track</span>
+
+ <span class='comment'># This is a special thing for arguments. The thing is, they need to
+</span> <span class='comment'># be inputted manually. So, if they are present they won't allow
+</span> <span class='comment'># anyone else to give results. Makes sense, yet a bit hacky.
+</span> <span class='kw'>unless</span> <span class='id identifier rubyid_current_track'>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='op'>||</span> <span class='id identifier rubyid_current_track'>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> <span class='op'>||</span> <span class='id identifier rubyid_current_track'>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='op'>||</span> <span class='id identifier rubyid_current_track'>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>
+ <span class='id identifier rubyid_track'>track</span> <span class='op'>=</span> <span class='id identifier rubyid_current_track'>current_track</span> <span class='kw'>unless</span> <span class='id identifier rubyid_lock'>lock</span>
+ <span class='id identifier rubyid_lock'>lock</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>arguments</span><span class='tstring_end'>"</span></span>
+ <span class='kw'>end</span>
+ <span class='kw'>rescue</span>
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>SourceConfigurationError</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_track'>track</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="disable-instance_method">
+
+ - (<tt>Object</tt>) <strong>disable</strong>(source_name)
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>
+Disables a source. This only removes the source from the `enabled_sources`
+configuration key.
+</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>source_name</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>
+the name of the source to disable
+</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">