Sha256: 69fd5acf3b7b1916fe3d719bdcaca3a0f28356d02e3509601430798f2a4945a5

Contents?: true

Size: 587 Bytes

Versions: 48

Compression:

Stored size: 587 Bytes

Contents

require 'middleman-core/core_extensions/collections/lazy_step'

module Middleman
  module CoreExtensions
    module Collections
      class LazyCollectorRoot < BasicObject
        def initialize(parent)
          @data = nil
          @parent = parent
        end

        def realize!(data)
          @data = data
        end

        def value(_ctx=nil)
          @data
        end

        def leaves
          @parent.leaves
        end

        def method_missing(name, *args, &block)
          LazyCollectorStep.new(name, args, block, self)
        end
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 3 rubygems

Version Path
middleman-core-4.0.0.rc.2 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.rc.1 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.beta.2 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.beta.1 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.alpha.6 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.alpha.5 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.alpha.4 lib/middleman-core/core_extensions/collections/lazy_root.rb
middleman-core-4.0.0.alpha.3 lib/middleman-core/core_extensions/collections/lazy_root.rb