Sha256: 34b9969a3d3d74e59f6bf8ddeb1509e288473c2584acfb8a2dbb69197416d884

Contents?: true

Size: 313 Bytes

Versions: 5

Compression:

Stored size: 313 Bytes

Contents

require 'arc-furnace/unfold'

module ArcFurnace
  class BlockUnfold < Unfold
    private_attr_reader :block

    def initialize(source:, block:)
      raise 'Must specify a block' if block.nil?
      @block = block
      super(source: source)
    end

    def unfold(row)
      block.call(row)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arc-furnace-0.1.6 lib/arc-furnace/block_unfold.rb
arc-furnace-0.1.5 lib/arc-furnace/block_unfold.rb
arc-furnace-0.1.4 lib/arc-furnace/block_unfold.rb
arc-furnace-0.1.3 lib/arc-furnace/block_unfold.rb
arc-furnace-0.1.0 lib/arc-furnace/block_unfold.rb