Class: Estated::Config
- Inherits:
-
Object
- Object
- Estated::Config
- Defined in:
- lib/estated/config.rb
Instance Attribute Summary collapse
- #api_key ⇒ Object
- #cache_ttl ⇒ Object
-
#mongo_client ⇒ Object
Returns the value of attribute mongo_client.
-
#mongo_collection ⇒ Object
Returns the value of attribute mongo_collection.
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
10 11 12 |
# File 'lib/estated/config.rb', line 10 def api_key @api_key ||= ENV['ESTATED_API_KEY'] end |
#cache_ttl ⇒ Object
6 7 8 |
# File 'lib/estated/config.rb', line 6 def cache_ttl @cache_ttl ||= 30 * 24 * 3600 # 30 days end |
#mongo_client ⇒ Object
Returns the value of attribute mongo_client.
4 5 6 |
# File 'lib/estated/config.rb', line 4 def mongo_client @mongo_client end |
#mongo_collection ⇒ Object
Returns the value of attribute mongo_collection.
4 5 6 |
# File 'lib/estated/config.rb', line 4 def mongo_collection @mongo_collection end |
Instance Method Details
#cache_enabled? ⇒ Boolean
14 15 16 |
# File 'lib/estated/config.rb', line 14 def cache_enabled? !!mongo_client end |