Class: Estated::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject



10
11
12
# File 'lib/estated/config.rb', line 10

def api_key
  @api_key ||= ENV['ESTATED_API_KEY']
end

#cache_ttlObject



6
7
8
# File 'lib/estated/config.rb', line 6

def cache_ttl
  @cache_ttl ||= 30 * 24 * 3600 # 30 days
end

#mongo_clientObject

Returns the value of attribute mongo_client.



4
5
6
# File 'lib/estated/config.rb', line 4

def mongo_client
  @mongo_client
end

#mongo_collectionObject

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

Returns:

  • (Boolean)


14
15
16
# File 'lib/estated/config.rb', line 14

def cache_enabled?
  !!mongo_client
end