Class: Greencache::Configuration
- Inherits:
-
Object
- Object
- Greencache::Configuration
- Defined in:
- lib/greencache/configuration.rb
Instance Attribute Summary collapse
-
#cache_time ⇒ Object
Returns the value of attribute cache_time.
-
#encrypt ⇒ Object
Returns the value of attribute encrypt.
-
#log_prefix ⇒ Object
Returns the value of attribute log_prefix.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#silent ⇒ Object
Returns the value of attribute silent.
-
#skip_cache ⇒ Object
Returns the value of attribute skip_cache.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 |
# File 'lib/greencache/configuration.rb', line 12 def initialize @cache_time = 600 @encrypt = false @secret = nil @skip_cache = false @silent = false @logger = nil @log_prefix = "greencache" end |
Instance Attribute Details
#cache_time ⇒ Object
Returns the value of attribute cache_time.
5 6 7 |
# File 'lib/greencache/configuration.rb', line 5 def cache_time @cache_time end |
#encrypt ⇒ Object
Returns the value of attribute encrypt.
6 7 8 |
# File 'lib/greencache/configuration.rb', line 6 def encrypt @encrypt end |
#log_prefix ⇒ Object
Returns the value of attribute log_prefix.
10 11 12 |
# File 'lib/greencache/configuration.rb', line 10 def log_prefix @log_prefix end |
#logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/greencache/configuration.rb', line 9 def logger @logger end |
#redis ⇒ Object
Returns the value of attribute redis.
3 4 5 |
# File 'lib/greencache/configuration.rb', line 3 def redis @redis end |
#secret ⇒ Object
Returns the value of attribute secret.
4 5 6 |
# File 'lib/greencache/configuration.rb', line 4 def secret @secret end |
#silent ⇒ Object
Returns the value of attribute silent.
8 9 10 |
# File 'lib/greencache/configuration.rb', line 8 def silent @silent end |
#skip_cache ⇒ Object
Returns the value of attribute skip_cache.
7 8 9 |
# File 'lib/greencache/configuration.rb', line 7 def skip_cache @skip_cache end |
Instance Method Details
#to_hash ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/greencache/configuration.rb', line 22 def to_hash { cache_time: cache_time, encrypt: encrypt, secret: secret, skip_cache: skip_cache, silent: silent, logger: logger, log_prefix: log_prefix, redis: redis } end |