Class: Geonames::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/geonames/config.rb

Constant Summary collapse

@@default_base_url =
"http://api.geonames.org"
@@default_lang =
"en"
@@default_username =
nil
@@default_token =
nil

Instance Attribute Summary collapse

Instance Attribute Details

#base_urlObject



29
30
31
# File 'lib/geonames/config.rb', line 29

def base_url
  @base_url || @@default_base_url
end

#langObject



33
34
35
# File 'lib/geonames/config.rb', line 33

def lang
  @lang || @@default_lang
end

#tokenObject



41
42
43
# File 'lib/geonames/config.rb', line 41

def token
  @token || @@default_token
end

#usernameObject



37
38
39
# File 'lib/geonames/config.rb', line 37

def username
  @username || @@default_username
end