Module: Machiawase

Defined in:
lib/machiawase.rb,
lib/machiawase/place.rb,
lib/machiawase/version.rb,
lib/machiawase/rendezvous.rb

Overview

Author:

Defined Under Namespace

Classes: Place, Rendezvous

Constant Summary collapse

VERSION =
"0.6.0"

Class Method Summary collapse

Class Method Details

.where(*addresses) ⇒ Place

Returns the place to rendezvous.

Parameters:

  • argv (Array<Place>)

    the array of places.

Returns:

  • (Place)

    the place to rendezvous.



18
19
20
21
22
23
24
25
26
# File 'lib/machiawase.rb', line 18

def self.where(*addresses)
  places = Array.new
  addresses.each do |address|
    g = Place.geocode(address)
    places << Place.new(g['lat'], g['lon'])
  end
  m = Rendezvous.new(*places)
  m.place
end