Skip to content
Snippets Groups Projects
Commit b98c0a36 authored by Alex Reisner's avatar Alex Reisner
Browse files

Change format of option lists in code comments.

parent c2efa35c
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ module Geocoder ...@@ -24,7 +24,7 @@ module Geocoder
# Calculate the distance between two points on Earth (Haversine formula). # Calculate the distance between two points on Earth (Haversine formula).
# Takes two sets of coordinates and an options hash: # Takes two sets of coordinates and an options hash:
# #
# <tt>:units</tt> :: <tt>:mi</tt> (default) or <tt>:km</tt> # * <tt>:units</tt> - <tt>:mi</tt> (default) or <tt>:km</tt>
# #
def distance_between(lat1, lon1, lat2, lon2, options = {}) def distance_between(lat1, lon1, lat2, lon2, options = {})
......
...@@ -53,12 +53,14 @@ module Geocoder::Orm ...@@ -53,12 +53,14 @@ module Geocoder::Orm
# records within a radius (in miles) of the given point. # records within a radius (in miles) of the given point.
# Options hash may include: # Options hash may include:
# #
# +units+ :: <tt>:mi</tt> (default) or <tt>:km</tt> # * +:units+ - <tt>:mi</tt> (default) or <tt>:km</tt>; to be used
# +exclude+ :: an object to exclude (used by the #nearbys method) # for interpreting radius as well as the +distance+ attribute which
# +order+ :: column(s) for ORDER BY SQL clause # is added to each found nearby object
# +limit+ :: number of records to return (for LIMIT SQL clause) # * +:select+ - string with the SELECT SQL fragment (e.g. “id, name”)
# +offset+ :: number of records to skip (for OFFSET SQL clause) # * +:order+ - column(s) for ORDER BY SQL clause
# +select+ :: string with the SELECT SQL fragment (e.g. “id, name”) # * +:limit+ - number of records to return (for LIMIT SQL clause)
# * +:offset+ - number of records to skip (for OFFSET SQL clause)
# * +:exclude+ - an object to exclude (used by the +nearbys+ method)
# #
def near_scope_options(latitude, longitude, radius = 20, options = {}) def near_scope_options(latitude, longitude, radius = 20, options = {})
radius *= Geocoder::Calculations.km_in_mi if options[:units] == :km radius *= Geocoder::Calculations.km_in_mi if options[:units] == :km
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment