Sha256: 19496844413151f8dc0c2306734748fd5195ecaad609203ff5a76d92420fc4c1
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
require 'arc-furnace/enumerator_source' module ArcFurance class HashSource < ArcFurnace::EnumeratorSource attr_reader :hashes # expects an array of hashes def initialize(hashes:) @hashes = hashes super() end def build_enumerator Enumerator.new do |yielder| hashes.each { |hash| yielder.yield(hash) } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arc-furnace-0.1.22 | lib/arc-furnace/hash_source.rb |