Class: Bridgetown::Current
- Inherits:
-
Object
- Object
- Bridgetown::Current
- Defined in:
- bridgetown-core/lib/bridgetown-core/current.rb
Class Method Summary collapse
-
.preloaded_configuration ⇒ Bridgetown::Configuration
-
.preloaded_configuration=(value) ⇒ Object
-
.site ⇒ Bridgetown::Site?
-
.site=(new_site) ⇒ Object
-
.sites ⇒ Hash<Symbol, Bridgetown::Site>
-
.thread_state ⇒ Object
Class Method Details
.preloaded_configuration ⇒ Bridgetown::Configuration
23 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 23 def preloaded_configuration = thread_state[:preloaded_configuration] |
.preloaded_configuration=(value) ⇒ Object
25 26 27 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 25 def preloaded_configuration=(value) thread_state[:preloaded_configuration] = value end |
.site ⇒ Bridgetown::Site?
11 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 11 def site = sites[:main] |
.site=(new_site) ⇒ Object
13 14 15 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 13 def site=(new_site) sites[:main] = new_site end |
.sites ⇒ Hash<Symbol, Bridgetown::Site>
18 19 20 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 18 def sites thread_state[:sites] ||= {} end |
.thread_state ⇒ Object
8 |
# File 'bridgetown-core/lib/bridgetown-core/current.rb', line 8 def thread_state = Thread.current.bridgetown_state ||= {} |