Class: Saviour::Config
- Inherits:
-
Object
- Object
- Saviour::Config
- Defined in:
- lib/saviour/config.rb
Defined Under Namespace
Classes: NotImplemented
Class Method Summary collapse
- .processing_enabled ⇒ Object
- .processing_enabled=(value) ⇒ Object
- .storage ⇒ Object
- .storage=(value) ⇒ Object
Class Method Details
.processing_enabled ⇒ Object
10 11 12 13 |
# File 'lib/saviour/config.rb', line 10 def processing_enabled Thread.current["Saviour::Config"] ||= {} Thread.current["Saviour::Config"][:processing_enabled] || true end |
.processing_enabled=(value) ⇒ Object
15 16 17 18 |
# File 'lib/saviour/config.rb', line 15 def processing_enabled=(value) Thread.current["Saviour::Config"] ||= {} Thread.current["Saviour::Config"][:processing_enabled] = value end |
.storage ⇒ Object
20 21 22 23 |
# File 'lib/saviour/config.rb', line 20 def storage Thread.current["Saviour::Config"] ||= {} Thread.current["Saviour::Config"][:storage] || (Thread.main["Saviour::Config"] && Thread.main["Saviour::Config"][:storage]) || NotImplemented.new end |
.storage=(value) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/saviour/config.rb', line 25 def storage=(value) Thread.current["Saviour::Config"] ||= {} Thread.current["Saviour::Config"][:storage] = value if Thread.main["Saviour::Config"].nil? Thread.main["Saviour::Config"] ||= {} Thread.main["Saviour::Config"][:storage] = value end end |