Sha256: 32311839f97ac7f88aa3a8a5c1d52b5bf8bb7c01376e9d3907e34d8ea1dac125

Contents?: true

Size: 714 Bytes

Versions: 4

Compression:

Stored size: 714 Bytes

Contents

module Timezone
  # 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 http://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 Configure
    def self.username
      @@username
    end
    
    def self.username= username
      @@username = username
    end
    
    def self.begin
      yield self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
timezone-0.1.3 lib/timezone/configure.rb
timezone-0.1.2 lib/timezone/configure.rb
timezone-0.1.1 lib/timezone/configure.rb
timezone-0.1.0 lib/timezone/configure.rb