Class: Timezone::Lookup::Basic
- Inherits:
-
Object
- Object
- Timezone::Lookup::Basic
- Defined in:
- lib/timezone/lookup/basic.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize(config) ⇒ Basic
constructor
A new instance of Basic.
- #lookup(lat, lng) ⇒ Object
Constructor Details
#initialize(config) ⇒ Basic
Returns a new instance of Basic.
6 7 8 |
# File 'lib/timezone/lookup/basic.rb', line 6 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/timezone/lookup/basic.rb', line 4 def config @config end |
Instance Method Details
#client ⇒ Object
10 11 12 |
# File 'lib/timezone/lookup/basic.rb', line 10 def client @client ||= config.http_client.new(config.protocol, config.url) end |
#lookup(lat, lng) ⇒ Object
14 15 16 |
# File 'lib/timezone/lookup/basic.rb', line 14 def lookup(lat, lng) raise NoMethodError, 'lookup is not implemented' end |