Class: Graticule::Locations

Inherits:
Array
  • Object
show all
Defined in:
lib/graticule/locations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/graticule/locations.rb', line 5

def options
  @options
end

Instance Method Details

#best_match(options, &comparator) ⇒ Object



7
8
9
10
11
12
# File 'lib/graticule/locations.rb', line 7

def best_match(options, &comparator)
  @options = options
  comparator ||= default_comparator

  max(&comparator)
end