Sha256: e7c26b3d7ff5fde989495b8d1243f0ccbb0b8bad9556e0eb612e1a8d29ec9ef1
Contents?: true
Size: 554 Bytes
Versions: 12
Compression:
Stored size: 554 Bytes
Contents
module ActiveGraph module Core module Result attr_writer :wrap def wrap? @wrap end def each(&block) wrap? ? wrapping_each(&block) : super end private def wrapping_each(&block) if @records @records.each(&block) else @records = [] method(:each).super_method.call do |record| record.wrap = wrap? @records << record block_given? ? yield(record) : record end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems