Sha256: b733645da46a8b6c7c8a4183fdcec280fdb215cb23d462131bc3f5190f3b343a

Contents?: true

Size: 618 Bytes

Versions: 22

Compression:

Stored size: 618 Bytes

Contents

module Access
  class Geolocation

    def self.search(options = {})
      Access::Api.new.geolocation_search options
    end

    def self.find(options = {})
      Access::Api.new.geolocation_find options
    end

    def self.process_batch(chunk)
      chunk.map { |geolocation| new(geolocation) }
    end

    def initialize(values)
      self.class.class_eval {attr_reader *values.keys }
      values.each do |attribute_name, attribute_value|
        self.instance_variable_set("@#{attribute_name}", attribute_value)
      end

      @geolocation = Geolocation.new(@geolocation) if @geolocation
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
access-2.0.50 lib/access/geolocation.rb
access-2.0.49 lib/access/geolocation.rb
access-2.0.48 lib/access/geolocation.rb
access-2.0.47 lib/access/geolocation.rb
access-2.0.46 lib/access/geolocation.rb
access-2.0.44 lib/access/geolocation.rb
access-2.0.43 lib/access/geolocation.rb
access-2.0.42 lib/access/geolocation.rb
access-2.0.41 lib/access/geolocation.rb
access-2.0.40 lib/access/geolocation.rb
access-2.0.39 lib/access/geolocation.rb
access-2.0.38 lib/access/geolocation.rb
access-2.0.37 lib/access/geolocation.rb
access-2.0.36 lib/access/geolocation.rb
access-2.0.34 lib/access/geolocation.rb
access-2.0.33 lib/access/geolocation.rb
access-2.0.32 lib/access/geolocation.rb
access-2.0.31 lib/access/geolocation.rb
access-2.0.30 lib/access/geolocation.rb
access-2.0.29 lib/access/geolocation.rb