Sha256: 028fef162ff9abd6c6c8c27c42deaadd7bdb1b90e0b2c2576375075214e40aaf
Contents?: true
Size: 440 Bytes
Versions: 28
Compression:
Stored size: 440 Bytes
Contents
module Neo4j module Core # A simple implementation of lazy map # @notice since we must support ruby 1.8.7 we can't use the fancy Enumerator block constructor for this. # @private class LazyMap include Enumerable def initialize(stuff, &map_block) @stuff = stuff @map_block = map_block end def each @stuff.each { |x| yield @map_block.call(x) } end end end end
Version data entries
28 entries across 28 versions & 1 rubygems