Sha256: 581f7d3fa454c1d22a36f6b1b0fdacae834fb07e481687efa1bad94ea0a8e6d3

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

module TheCity

  class SkillListReader < 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 = "skill_list_#{page}"   
      @url_data_path = "/skills"
      @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
      white_list = [:page]
      options.clone.delete_if { |key, value| !white_list.include?(key) }
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
the-city-admin-0.6.0 lib/readers/skill_list_reader.rb