Sha256: 75911b3eff81b8a0b383b3703a52237b0d857b120b3b64823f5cafd06fdd8d61
Contents?: true
Size: 966 Bytes
Versions: 39
Compression:
Stored size: 966 Bytes
Contents
module Access class Location def self.search(options = {}) Access::Api.new.search_locations options end def self.find(location_key, options = {}) Access::Api.new.find_location location_key, options end def self.process_batch(chunk) chunk.map { |location| new(location) } end def initialize(values) self.class.class_eval {attr_reader *values.keys } if values values.each do |attribute_name, attribute_value| self.instance_variable_set("@#{attribute_name}", attribute_value) end @links = Access::Link.new(@links) if @links @location_store = Access::Store.new(@location_store) if @location_store @location_categories = Access::Category.process_batch(@location_categories) if @location_categories @physical_location = Access::Location.new(@physical_location) if @physical_location @geolocation = Geolocation.new(@geolocation) if @geolocation end end end
Version data entries
39 entries across 39 versions & 1 rubygems