doc/Songkickr/ArtistResult.html in songkickr-0.2.0 vs doc/Songkickr/ArtistResult.html in songkickr-0.2.1

- old
+ new

@@ -220,104 +220,104 @@ </div><!-- attribute-method-details --> <!-- Methods --> - <div id="protected-instance-method-details" class="method-section section"> - <h3 class="section-header">Protected Instance Methods</h3> + <div id="public-class-method-details" class="method-section section"> + <h3 class="section-header">Public Class Methods</h3> - <div id="parse_results-method" class="method-detail "> - <a name="method-i-parse_results"></a> + <div id="new-method" class="method-detail "> + <a name="method-c-new"></a> <div class="method-heading"> - <span class="method-name">parse_results</span><span - class="method-args">(results = {})</span> + <span class="method-name">new</span><span + class="method-args">(result_hash = {})</span> <span class="method-click-advice">click to toggle source</span> </div> <div class="method-description"> - <p>Take the results hash directly and parse the artists into <a -href="Artist.html">Artist</a> objects.</p> - -<p>Returns an array of Artists.</p> + <p>Takes the result hash directly and parses out the page and total entries +and finally passes off to the <a +href="ArtistResult.html#method-i-parse_results">parse_results</a> method to +get the results.</p> - <div class="method-source-code" id="parse_results-source"> + <div class="method-source-code" id="new-source"> <pre> -<span class="ruby-comment"># File lib/songkickr/artist_result.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">parse_results</span>(<span class="ruby-identifier">results</span> = {}) - <span class="ruby-identifier">artists</span> = [] - <span class="ruby-keyword">if</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;artist&quot;</span>) - <span class="ruby-identifier">results</span>[<span class="ruby-string">&quot;artist&quot;</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">artist</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">artists</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">Artist</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">artist</span>) - <span class="ruby-keyword">end</span> +<span class="ruby-comment"># File lib/songkickr/artist_result.rb, line 7</span> +<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">result_hash</span> = {}) + <span class="ruby-identifier">results_page</span> = <span class="ruby-identifier">result_hash</span>[<span class="ruby-string">&quot;resultsPage&quot;</span>] + + <span class="ruby-keyword">if</span> <span class="ruby-identifier">results_page</span> + <span class="ruby-ivar">@page</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;page&quot;</span>] + <span class="ruby-ivar">@total_entries</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;totalEntries&quot;</span>] + <span class="ruby-ivar">@results</span> = <span class="ruby-identifier">parse_results</span> <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;results&quot;</span>] <span class="ruby-keyword">end</span> - <span class="ruby-identifier">artists</span> <span class="ruby-keyword">end</span></pre> - </div><!-- parse_results-source --> + </div><!-- new-source --> </div> - </div><!-- parse_results-method --> + </div><!-- new-method --> - </div><!-- protected-instance-method-details --> + </div><!-- public-class-method-details --> - <div id="public-class-method-details" class="method-section section"> - <h3 class="section-header">Public Class Methods</h3> + <div id="protected-instance-method-details" class="method-section section"> + <h3 class="section-header">Protected Instance Methods</h3> - <div id="new-method" class="method-detail "> - <a name="method-c-new"></a> + <div id="parse_results-method" class="method-detail "> + <a name="method-i-parse_results"></a> <div class="method-heading"> - <span class="method-name">new</span><span - class="method-args">(result_hash = {})</span> + <span class="method-name">parse_results</span><span + class="method-args">(results = {})</span> <span class="method-click-advice">click to toggle source</span> </div> <div class="method-description"> - <p>Takes the result hash directly and parses out the page and total entries -and finally passes off to the <a -href="ArtistResult.html#method-i-parse_results">parse_results</a> method to -get the results.</p> + <p>Take the results hash directly and parse the artists into <a +href="Artist.html">Artist</a> objects.</p> + +<p>Returns an array of Artists.</p> - <div class="method-source-code" id="new-source"> + <div class="method-source-code" id="parse_results-source"> <pre> -<span class="ruby-comment"># File lib/songkickr/artist_result.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">result_hash</span> = {}) - <span class="ruby-identifier">results_page</span> = <span class="ruby-identifier">result_hash</span>[<span class="ruby-string">&quot;resultsPage&quot;</span>] - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">results_page</span> - <span class="ruby-ivar">@page</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;page&quot;</span>] - <span class="ruby-ivar">@total_entries</span> = <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;totalEntries&quot;</span>] - <span class="ruby-ivar">@results</span> = <span class="ruby-identifier">parse_results</span> <span class="ruby-identifier">results_page</span>[<span class="ruby-string">&quot;results&quot;</span>] +<span class="ruby-comment"># File lib/songkickr/artist_result.rb, line 22</span> +<span class="ruby-keyword">def</span> <span class="ruby-identifier">parse_results</span>(<span class="ruby-identifier">results</span> = {}) + <span class="ruby-identifier">artists</span> = [] + <span class="ruby-keyword">if</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;artist&quot;</span>) + <span class="ruby-identifier">results</span>[<span class="ruby-string">&quot;artist&quot;</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">artist</span><span class="ruby-operator">|</span> + <span class="ruby-identifier">artists</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Songkickr</span><span class="ruby-operator">::</span><span class="ruby-constant">Artist</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">artist</span>) + <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span> + <span class="ruby-identifier">artists</span> <span class="ruby-keyword">end</span></pre> - </div><!-- new-source --> + </div><!-- parse_results-source --> </div> - </div><!-- new-method --> + </div><!-- parse_results-method --> - </div><!-- public-class-method-details --> + </div><!-- protected-instance-method-details --> </div><!-- 5Buntitled-5D --> </div><!-- documentation -->