Class: Geoptima::LocatorAlgorithm
- Inherits:
-
Object
- Object
- Geoptima::LocatorAlgorithm
- Defined in:
- lib/geoptima/locator.rb
Direct Known Subclasses
AfterLocatorAlgorithm, BeforeLocatorAlgorithm, ClosestLocatorAlgorithm
Instance Method Summary collapse
Instance Method Details
#locate(locatable) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/geoptima/locator.rb', line 11 def locate(locatable) if locatable.next_point locatable.location = locatable.next_point elsif locatable.previous_point locatable.location = locatable.previous_point else locatable.location = nil end end |