Sha256: 57362cba3443a5322075b204b1a3e1d5327cda44970dc9e348ccaeb73fd18b00

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

module Geokit
  VERSION = '1.2.0'
  # These defaults are used in Geokit::Mappable.distance_to and in acts_as_mappable
  @@default_units = :miles
  @@default_formula = :sphere

  [:default_units, :default_formula].each do |sym|
    class_eval <<-EOS, __FILE__, __LINE__
      def self.#{sym}
        if defined?(#{sym.to_s.upcase})
          #{sym.to_s.upcase}
        else
          @@#{sym}
        end
      end

      def self.#{sym}=(obj)
        @@#{sym} = obj
      end
    EOS
  end
end

require 'geokit/geocoders'
require 'geokit/mappable'

# make old-style module name "GeoKit" equivilent to new-style "Geokit"
module GeoKit
  include Geokit
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
andre-geokit-1.2.0 lib/geokit.rb