Sha256: 2843592d48f8d0e525d7af3e3496fc212faff7d53babbd1b80fd7f3e64c59ac7

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geokit-1.7.1 lib/geokit.rb