Sha256: 6916d0e33425326c92ac4d4542a8cb65a8686c548df67b2f83e98f0c35699a98
Contents?: true
Size: 767 Bytes
Versions: 25
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true 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::ItemCollection.new(@config, objs) end end def layouts @_layouts ||= begin objs = @data_sources.flat_map(&:layouts) Nanoc::Int::LayoutCollection.new(@config, objs) end end def item_changes SlowEnumeratorTools.merge(@data_sources.map(&:item_changes)) end def layout_changes SlowEnumeratorTools.merge(@data_sources.map(&:layout_changes)) end end end
Version data entries
25 entries across 25 versions & 1 rubygems