Sha256: d495832fce0505b3a583480419c3f1646d53d76640d27e89729f03c36d8bf5d4

Contents?: true

Size: 874 Bytes

Versions: 3

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Drops
    class SiteDrop < Drop
      extend Forwardable

      mutable false

      def_delegators :@obj,
                     :base_path,
                     :data,
                     :locale,
                     :time,
                     :generated_pages,
                     :static_files,
                     :tags,
                     :categories,
                     :taxonomies,
                     :taxonomy_types

      private def_delegator :@obj, :config, :fallback_data

      attr_writer :current_document

      def resources
        @resources ||= @obj.resources
      end

      def contents
        @contents ||= @obj.contents
      end

      def metadata
        @site_metadata ||= @obj.data["site_metadata"]
      end

      def config
        @obj.config
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/drops/site_drop.rb
bridgetown-core-2.0.0.beta2 lib/bridgetown-core/drops/site_drop.rb
bridgetown-core-2.0.0.beta1 lib/bridgetown-core/drops/site_drop.rb