Sha256: 447b94be960c94d82ed67eb193f40b1cd9007c04d2cb86505b4e5e2d8efc84b6
Contents?: true
Size: 640 Bytes
Versions: 7
Compression:
Stored size: 640 Bytes
Contents
module Nanoc::Int # @api private class DependencyTracker class Null def enter(_obj) end def exit(_obj) end def bounce(_obj) end end def initialize(dependency_store) @dependency_store = dependency_store @stack = [] end def enter(obj) unless @stack.empty? Nanoc::Int::NotificationCenter.post(:dependency_created, @stack.last, obj) @dependency_store.record_dependency(@stack.last, obj) end @stack.push(obj) end def exit(_obj) @stack.pop end def bounce(obj) enter(obj) exit(obj) end end end
Version data entries
7 entries across 7 versions & 1 rubygems