Sha256: 87486327abc11691822aadc3af69d78a958e756ca17152b2261c697fdee0fa08

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

module DataForge
  module Transformation
    class TransformationBase

      protected

      def with_writers(writers)
        writers.each { |writer| writer.open }
        begin
          yield writers
        ensure
          writers.each { |writer| writer.close }
        end
      end



      def with_writer(writer)
        writer.open
        begin
          yield writer
        ensure
          writer.close
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
data_forge-0.1.1 lib/data_forge/transformation/transformation_base.rb
data_forge-0.1 lib/data_forge/transformation/transformation_base.rb