Class: Bridgetown::Current
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- Bridgetown::Current
- Defined in:
- lib/bridgetown-core/current.rb
Class Method Summary collapse
- .preloaded_configuration ⇒ Bridgetown::Configuration
- .site ⇒ Bridgetown::Site?
- .site=(new_site) ⇒ Object
- .sites ⇒ Hash<Symbol, Bridgetown::Site>
Instance Method Summary collapse
-
#initialize ⇒ Current
constructor
A new instance of Current.
Constructor Details
#initialize ⇒ Current
Returns a new instance of Current.
23 24 25 26 |
# File 'lib/bridgetown-core/current.rb', line 23 def initialize super @attributes[:sites] = {} end |
Class Method Details
.preloaded_configuration ⇒ Bridgetown::Configuration
7 |
# File 'lib/bridgetown-core/current.rb', line 7 attribute :preloaded_configuration |
.site ⇒ Bridgetown::Site?
10 11 12 |
# File 'lib/bridgetown-core/current.rb', line 10 def self.site sites[:main] end |
.site=(new_site) ⇒ Object
14 15 16 |
# File 'lib/bridgetown-core/current.rb', line 14 def self.site=(new_site) sites[:main] = new_site end |
.sites ⇒ Hash<Symbol, Bridgetown::Site>
21 |
# File 'lib/bridgetown-core/current.rb', line 21 attribute :sites |