Sha256: b384375d902f4b40e0c4eba4ffb37bcf404b9104af7f18065db35f5dd23ed53f

Contents?: true

Size: 586 Bytes

Versions: 24

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  class StaticFileReader
    attr_reader :site, :dir, :unfiltered_content
    def initialize(site, dir)
      @site = site
      @dir = dir
      @unfiltered_content = []
    end

    # Create a new StaticFile object for every entry in a given list of basenames.
    #
    # files - an array of file basenames.
    #
    # Returns an array of static files.
    def read(files)
      files.each do |file|
        @unfiltered_content << StaticFile.new(@site, @site.source, @dir, file)
      end
      @unfiltered_content
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bridgetown-core-0.16.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.16.0.beta2 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.16.0.beta1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.15.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.15.0.beta4 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.15.0.beta3 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.15.0.beta2 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.15.0.beta1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.14.1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.14.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.13.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.12.1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.12.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.11.2 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.11.1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.11.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.10.2 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.10.1 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.10.0 lib/bridgetown-core/readers/static_file_reader.rb
bridgetown-core-0.9.0 lib/bridgetown-core/readers/static_file_reader.rb