Sha256: dab0b517e58708b5203841d0b38a1c038aaea5c320a3eb4675c90c91bc883918

Contents?: true

Size: 554 Bytes

Versions: 12

Compression:

Stored size: 554 Bytes

Contents

module Nanoc::Int
  class AggregateDataSource < Nanoc::DataSource
    def initialize(data_sources, config)
      super({}, '/', '/', {})

      @data_sources = data_sources
      @config = config
    end

    def items
      @_items ||= begin
        objs = @data_sources.flat_map(&:items)
        Nanoc::Int::IdentifiableCollection.from(objs, @config)
      end
    end

    def layouts
      @_layouts ||= begin
        objs = @data_sources.flat_map(&:layouts)
        Nanoc::Int::IdentifiableCollection.from(objs, @config)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
nanoc-4.7.9 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.8 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.7 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.6 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.5 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.4 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.3 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.2 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.1 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.7.0 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.6.4 lib/nanoc/base/repos/aggregate_data_source.rb
nanoc-4.6.3 lib/nanoc/base/repos/aggregate_data_source.rb