class Nanoc::Core::AggregateDataSource

Public Class Methods

new(data_sources, config) click to toggle source
Calls superclass method Nanoc::Core::DataSource::new
# File lib/nanoc/core/aggregate_data_source.rb, line 6
def initialize(data_sources, config)
  super({}, '/', '/', {})

  @data_sources = data_sources
  @config = config
end

Public Instance Methods

item_changes() click to toggle source
# File lib/nanoc/core/aggregate_data_source.rb, line 27
def item_changes
  SlowEnumeratorTools.merge(@data_sources.map(&:item_changes))
end
items() click to toggle source
# File lib/nanoc/core/aggregate_data_source.rb, line 13
def items
  @_items ||= begin
    objs = @data_sources.flat_map(&:items)
    Nanoc::Core::ItemCollection.new(@config, objs)
  end
end
layout_changes() click to toggle source
# File lib/nanoc/core/aggregate_data_source.rb, line 31
def layout_changes
  SlowEnumeratorTools.merge(@data_sources.map(&:layout_changes))
end
layouts() click to toggle source
# File lib/nanoc/core/aggregate_data_source.rb, line 20
def layouts
  @_layouts ||= begin
    objs = @data_sources.flat_map(&:layouts)
    Nanoc::Core::LayoutCollection.new(@config, objs)
  end
end