Sha256: 7de609a4fdd24c0d2d1f85ef02c502b589d19702d8a0f66b88892a941356a9da

Contents?: true

Size: 558 Bytes

Versions: 14

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  class Current < ActiveSupport::CurrentAttributes
    # @!method self.preloaded_configuration
    #   @return [Bridgetown::Configuration]
    attribute :preloaded_configuration

    # @return [Bridgetown::Site, nil]
    def self.site
      sites[:main]
    end

    def self.site=(new_site)
      sites[:main] = new_site
    end

    # @!method self.sites
    #   @return [Hash<Symbol, Bridgetown::Site>]

    attribute :sites

    def initialize
      super
      @attributes[:sites] = {}
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/bridgetown-core/current.rb
bridgetown-core-1.3.3 lib/bridgetown-core/current.rb
bridgetown-core-1.3.2 lib/bridgetown-core/current.rb
bridgetown-core-1.3.1 lib/bridgetown-core/current.rb
bridgetown-core-1.3.0 lib/bridgetown-core/current.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/current.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/current.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/current.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/current.rb