Sha256: ab1b3e61e65e7f2dc10db7e7a680944dc3af74b5eb73882830d3aff8c1334c15

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

module Geokit
  VERSION = '0.0.4'
  # 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

path = File.expand_path(File.dirname(__FILE__))
$:.unshift path unless $:.include?(path)
require 'geokit/geocoders'
require 'geokit/mappable'

# make old-style module name "GeoKit" equivalent to new-style "Geokit"
GeoKit=Geokit

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geokit-premier-0.0.4 lib/geokit.rb