Class: TZDetect::Configuration
- Inherits:
-
Object
- Object
- TZDetect::Configuration
- Defined in:
- lib/tzdetect/configuration.rb
Constant Summary collapse
- ALLOWED_TYPES =
[:google, :geoname]
- @@google_signature =
nil
- @@google_client_key =
nil
Class Method Summary collapse
- .begin {|_self| ... } ⇒ Object
- .google_client_key ⇒ Object
- .google_client_key=(google_key) ⇒ Object
- .google_signature ⇒ Object
- .google_signature=(google_signature) ⇒ Object
- .service ⇒ Object
- .service=(type) ⇒ Object
- .username ⇒ Object
- .username=(username) ⇒ Object
Class Method Details
.begin {|_self| ... } ⇒ Object
42 43 44 |
# File 'lib/tzdetect/configuration.rb', line 42 def self.begin yield self end |
.google_client_key ⇒ Object
17 18 19 |
# File 'lib/tzdetect/configuration.rb', line 17 def self.google_client_key @@google_client_key end |
.google_client_key=(google_key) ⇒ Object
21 22 23 |
# File 'lib/tzdetect/configuration.rb', line 21 def self.google_client_key= google_key @@google_client_key= google_key end |
.google_signature ⇒ Object
25 26 27 |
# File 'lib/tzdetect/configuration.rb', line 25 def self.google_signature @@google_signature end |
.google_signature=(google_signature) ⇒ Object
29 30 31 |
# File 'lib/tzdetect/configuration.rb', line 29 def self.google_signature= google_signature @@google_key= google_signature end |
.service ⇒ Object
13 14 15 |
# File 'lib/tzdetect/configuration.rb', line 13 def self.service @@service ||= :google end |
.service=(type) ⇒ Object
8 9 10 11 |
# File 'lib/tzdetect/configuration.rb', line 8 def self.service= type raise ArgumentError, "wrong service type" unless ALLOWED_TYPES.include?(type.to_sym) @@service= type end |
.username ⇒ Object
38 39 40 |
# File 'lib/tzdetect/configuration.rb', line 38 def self.username @@username end |
.username=(username) ⇒ Object
34 35 36 |
# File 'lib/tzdetect/configuration.rb', line 34 def self.username= username @@username = username end |