Class: DHS::Config
Instance Attribute Summary collapse
-
#auto_oauth ⇒ Object
Returns the value of attribute auto_oauth.
-
#request_cycle_cache ⇒ Object
Returns the value of attribute request_cycle_cache.
-
#request_cycle_cache_enabled ⇒ Object
Returns the value of attribute request_cycle_cache_enabled.
-
#trace ⇒ Object
Returns the value of attribute trace.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 |
# File 'lib/dhs/config.rb', line 10 def initialize self.request_cycle_cache_enabled ||= true self.trace ||= false if defined?(ActiveSupport::Cache::MemoryStore) self.request_cycle_cache ||= ActiveSupport::Cache::MemoryStore.new end end |
Instance Attribute Details
#auto_oauth ⇒ Object
Returns the value of attribute auto_oauth.
8 9 10 |
# File 'lib/dhs/config.rb', line 8 def auto_oauth @auto_oauth end |
#request_cycle_cache ⇒ Object
Returns the value of attribute request_cycle_cache.
8 9 10 |
# File 'lib/dhs/config.rb', line 8 def request_cycle_cache @request_cycle_cache end |
#request_cycle_cache_enabled ⇒ Object
Returns the value of attribute request_cycle_cache_enabled.
8 9 10 |
# File 'lib/dhs/config.rb', line 8 def request_cycle_cache_enabled @request_cycle_cache_enabled end |
#trace ⇒ Object
Returns the value of attribute trace.
8 9 10 |
# File 'lib/dhs/config.rb', line 8 def trace @trace end |
Instance Method Details
#reset ⇒ Object
18 19 20 21 22 23 |
# File 'lib/dhs/config.rb', line 18 def reset self.request_cycle_cache_enabled = nil self.trace = nil self.request_cycle_cache = nil initialize end |