Sha256: 80e70c3be341bcdaf4440e50f6159df21fd56285586132f2dd30897346b5989d

Contents?: true

Size: 845 Bytes

Versions: 63

Compression:

Stored size: 845 Bytes

Contents

module Geocoder

  ##
  # Methods for invoking Geocoder in a model.
  #
  module Model
    module Base

      def geocoder_options
        if defined?(@geocoder_options)
          @geocoder_options
        elsif superclass.respond_to?(:geocoder_options)
          superclass.geocoder_options || { }
        else
          { }
        end
      end

      def geocoded_by
        fail
      end

      def reverse_geocoded_by
        fail
      end

      private # ----------------------------------------------------------------

      def geocoder_init(options)
        unless defined?(@geocoder_options)
          @geocoder_options = {}
          require "geocoder/stores/#{geocoder_file_name}"
          include Geocoder::Store.const_get(geocoder_module_name)
        end
        @geocoder_options.merge! options
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 6 rubygems

Version Path
really-broken-geocoder-1.5.1 lib/geocoder/models/base.rb
geocoder-1.5.1 lib/geocoder/models/base.rb
geocoder-1.5.0 lib/geocoder/models/base.rb
geocoder-1.4.9 lib/geocoder/models/base.rb
geocoder-1.4.8 lib/geocoder/models/base.rb
geocoder-1.4.7 lib/geocoder/models/base.rb
geocoder-1.4.6 lib/geocoder/models/base.rb
geocoder-1.4.5 lib/geocoder/models/base.rb
geocoder-1.4.4 lib/geocoder/models/base.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/geocoder-1.4.3/lib/geocoder/models/base.rb
geocoder-1.4.3 lib/geocoder/models/base.rb
geocoder-1.4.2 lib/geocoder/models/base.rb
geocoder-1.4.1 lib/geocoder/models/base.rb
geocoder-1.4.0 lib/geocoder/models/base.rb
geocoder-1.3.7 lib/geocoder/models/base.rb
geocoder-1.3.6 lib/geocoder/models/base.rb
geocoder-1.3.5 lib/geocoder/models/base.rb
broken-geocoder-1.3.6 lib/geocoder/models/base.rb
broken-geocoder-1.3.5 lib/geocoder/models/base.rb
broken-geocoder-1.3.4 lib/geocoder/models/base.rb