Class: TimestampMaker::TimeZoneLookupers::Wheretz

Inherits:
Object
  • Object
show all
Defined in:
lib/timestamp_maker/time_zone_lookupers/wheretz.rb

Instance Method Summary collapse

Instance Method Details

#lookup(latitude:, longitude:) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/timestamp_maker/time_zone_lookupers/wheretz.rb', line 9

def lookup(latitude:, longitude:)
  case result = WhereTZ.lookup(latitude, longitude)
  when String then result
  when Array then result.first
  else raise 'Something went wrong with WhereTZ'
  end
end