Sha256: d0a842e48e25a24db743ff6618d6e65ebd0f0075482f260bf0cf8906e951d0a4

Contents?: true

Size: 305 Bytes

Versions: 13

Compression:

Stored size: 305 Bytes

Contents

module Demonoid
  class ResultSet < Array
    attr_accessor :total_results, :search

    def initialize(initializer)
      self.search = initializer
      self.total_results = 1.0/0 #Infinity
    end

    def retrieved_results
      self.size
    end

    def more
      search.next_page
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
torrent_api-0.3.0 lib/demonoid/result_set.rb
torrent_api-0.2.8 lib/demonoid/result_set.rb
torrent_api-0.2.7 lib/demonoid/result_set.rb
torrent_api-0.2.6 lib/demonoid/result_set.rb
torrent_api-0.2.5 lib/demonoid/result_set.rb
torrent_api-0.2.3 lib/demonoid/result_set.rb
torrent_api-0.2.2 lib/demonoid/result_set.rb
torrent_api-0.2.1 lib/demonoid/result_set.rb
torrent_api-0.2.0 lib/demonoid/result_set.rb
torrent_api-0.1.2 lib/demonoid/result_set.rb
torrent_api-0.1.1 lib/demonoid/result_set.rb
torrent_api-0.1.0 lib/demonoid/result_set.rb
torrent_api-0.0.9 lib/demonoid/result_set.rb