Class: Timezone::Configure

Inherits:
Object
  • Object
show all
Defined in:
lib/timezone/configure.rb

Overview

Configuration class for the Timezone gem.

Timezone::Configure.begin do |c| ... end

c.username = username - the geonames username you use to access the geonames timezone API.

Signup for a geonames username at www.geonames.org/login. Use that username to configure your application for latitude and longitude based timezone searches. If you aren’t going to initialize timezone objects based on latitude and longitude then this configuration is not necessary.

Class Method Summary collapse

Class Method Details

.begin {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



20
21
22
# File 'lib/timezone/configure.rb', line 20

def self.begin
  yield self
end

.usernameObject



12
13
14
# File 'lib/timezone/configure.rb', line 12

def self.username
  @@username
end

.username=(username) ⇒ Object



16
17
18
# File 'lib/timezone/configure.rb', line 16

def self.username= username
  @@username = username
end