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

Version Path
neo4j-core-2.3.0-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.4-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.3-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.2-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.1-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.0-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.2.0.rc1-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.1.0-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.0.1-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.0.0-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.0.0.rc2-java lib/neo4j-core/lazy_map.rb
neo4j-core-2.0.0.rc1-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.15-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.14-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.13-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.12-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.11-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.10-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.9-java lib/neo4j-core/lazy_map.rb
neo4j-core-0.0.8-java lib/neo4j-core/lazy_map.rb