Sha256: 31704db0c224097d01bd3180a9bb416eb7fb0c0867bcd24149ebd61cd3404b6f

Contents?: true

Size: 616 Bytes

Versions: 1

Compression:

Stored size: 616 Bytes

Contents

module DataForge
  module File
    module RecordFileDefinition

      def self.from_input(name, &initialization_block)
        from_copy nil, name, &initialization_block
      end



      def self.from_copy(source_definition, name, &initialization_block)
        CSV::CSVRecordFileDefinition.new(name).tap do |definition|
          definition.copy source_definition if source_definition
          definition.instance_eval &initialization_block if initialization_block
        end
      end



      # Interface definition

      attr_reader :name, :fields



      def copy(definition)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
data_forge-0.1.1 lib/data_forge/file/record_file_definition.rb