Sha256: 251de90b50c34ce6ec5e0dd4a5b3ea521ce4682694924c6516b36e07a4e9a3a7

Contents?: true

Size: 533 Bytes

Versions: 25

Compression:

Stored size: 533 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Int
  class InMemDataSource < Nanoc::DataSource
    attr_reader :items
    attr_reader :layouts

    def initialize(items, layouts, orig_data_source = nil)
      super({}, '/', '/', {})

      @items = items
      @layouts = layouts
      @orig_data_source = orig_data_source
    end

    def item_changes
      @orig_data_source ? @orig_data_source.item_changes : super
    end

    def layout_changes
      @orig_data_source ? @orig_data_source.layout_changes : super
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
nanoc-4.11.0 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.10.4 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.10.3 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.10.2 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.10.1 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.10.0 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.9 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.8 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.7 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.6 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.5 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.4 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.3 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.2 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.1 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.9.0 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.8.19 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.8.18 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.8.17 lib/nanoc/base/repos/in_mem_data_source.rb
nanoc-4.8.16 lib/nanoc/base/repos/in_mem_data_source.rb