Sha256: bdf832663b53f4809be5e04d39930aa51cc5892bb8d6845d52947a450cf86295
Contents?: true
Size: 324 Bytes
Versions: 8
Compression:
Stored size: 324 Bytes
Contents
module AgnosticBackend module Indexable class CircularReferenceError < StandardError; end class ObjectObserver def initialize @objects = Set.new end def add(obj) raise CircularReferenceError.new(obj) if @objects.include? obj @objects << obj end end end end
Version data entries
8 entries across 8 versions & 1 rubygems