Sha256: 815bc0cce4b5c92c6a4e074938b2bc1e9a4f703bdb4c5f65a8c1463b29b4bc68

Contents?: true

Size: 703 Bytes

Versions: 11

Compression:

Stored size: 703 Bytes

Contents

module TheCity

  class TagListReader < ApiReader

    # Constructor.
    #
    # @param options A hash of options for requesting data from the server.
    # @param [CacheAdapter] cacher (optional) The cacher to be used to cache data.
    def initialize(options = {}, cacher = nil) 
      options[:page] ||= 1

      #@class_key = "tag_list_#{page}"   
      @url_data_path = "/tags"
      @url_data_params = white_list_options(options)
      
      # The object to store and load the cache.
      @cacher = cacher unless cacher.nil?    
    end

    def white_list_options(options)
      white_list = [:page]
      options.clone.delete_if { |key, value| !white_list.include?(key) }
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
the-city-admin-0.7.1 lib/readers/tag_list_reader.rb
the-city-admin-0.7.0 lib/readers/tag_list_reader.rb
the-city-admin-0.6.9 lib/readers/tag_list_reader.rb
the-city-admin-0.6.8 lib/readers/tag_list_reader.rb
the-city-admin-0.6.7 lib/readers/tag_list_reader.rb
the-city-admin-0.6.6 lib/readers/tag_list_reader.rb
the-city-admin-0.6.5 lib/readers/tag_list_reader.rb
the-city-admin-0.6.4 lib/readers/tag_list_reader.rb
the-city-admin-0.6.3 lib/readers/tag_list_reader.rb
the-city-admin-0.6.2 lib/readers/tag_list_reader.rb
the-city-admin-0.6.1 lib/readers/tag_list_reader.rb