Class: ZoneDetect
- Inherits:
-
Object
- Object
- ZoneDetect
- Defined in:
- lib/zone_detect.rb,
lib/zone_detect/version.rb,
ext/zone_detect/zone_detect.c
Overview
:nodoc:
Defined Under Namespace
Classes: Config
Constant Summary collapse
- VERSION =
'0.3.0'
Class Method Summary collapse
Instance Method Summary collapse
- #find ⇒ Object
- #initialize ⇒ Object constructor
Constructor Details
#initialize ⇒ Object
7 |
# File 'ext/zone_detect/zone_detect.c', line 7 static VALUE initialize(VALUE self, VALUE path); |
Class Method Details
.configure {|config| ... } ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/zone_detect.rb', line 13 def self.configure config = Config.new yield config raise 'Missing required configuration: timezone_data_path' unless config.timezone_data_path @instance = ZoneDetect.new(config.timezone_data_path) nil end |
.find(lat, lng) ⇒ Object
22 23 24 25 26 |
# File 'lib/zone_detect.rb', line 22 def self.find(lat, lng) raise 'Missing configuration' unless @instance @instance.find(lat, lng) end |
Instance Method Details
#find ⇒ Object
8 |
# File 'ext/zone_detect/zone_detect.c', line 8 static VALUE find(VALUE self, VALUE lat, VALUE lng); |