Sha256: 2527f56ab910372e1f9782bdcb85fd78d36f346e74d4de8c1c32a5e53a196eef

Contents?: true

Size: 377 Bytes

Versions: 9

Compression:

Stored size: 377 Bytes

Contents

require 'flattr/base'

module Flattr
  class Search < Flattr::Base

    lazy_attr_reader :total_items, :items, :page, :things

    def initialize(attrs={})
      if attrs["items"] > 0
        items = []
        attrs["things"].each do |item|
          items << Flattr::Thing.new(item)
        end
        attrs["things"] = items
      end
      super attrs
    end

   end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flattr-0.3.7 lib/flattr/search.rb
flattr-0.3.6 lib/flattr/search.rb
flattr-0.3.5 lib/flattr/search.rb
flattr-0.3.4 lib/flattr/search.rb
flattr-0.3.3 lib/flattr/search.rb
flattr-0.3.2 lib/flattr/search.rb
flattr-0.3.1 lib/flattr/search.rb
flattr-0.3.0 lib/flattr/search.rb
flattr-0.2.3 lib/flattr/search.rb