Sha256: 70005c0d59085f54c5b8a74884dfc74305f1a1cdfb28153ab964e5a1097d471b

Contents?: true

Size: 726 Bytes

Versions: 11

Compression:

Stored size: 726 Bytes

Contents

module TheCity

  class TerminologyListReader < 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 = "terminology_list_#{page}"   
      @url_data_path = "/terminology"
      @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/terminology_list_reader.rb
the-city-admin-0.7.0 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.9 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.8 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.7 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.6 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.5 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.4 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.3 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.2 lib/readers/terminology_list_reader.rb
the-city-admin-0.6.1 lib/readers/terminology_list_reader.rb