Sha256: 38cccf057095863890c85f0a20433308c2fd2854742f16518b3d2e5a4d85a4a9

Contents?: true

Size: 326 Bytes

Versions: 2

Compression:

Stored size: 326 Bytes

Contents

module Traitorous
  module Converter
    class UniformArray
      def initialize(uniform_class)
        @uniform_class ||= uniform_class
      end
      def do_export(data_arr)
        data_arr.map(&:export)
      end

      def do_import(opts_arr)
        opts_arr.map{|d| @uniform_class.new(d)}
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
traitorous-0.2.0 lib/traitorous/converter/uniform_array.rb
traitorous-0.1.0 lib/traitorous/converter/uniform_array.rb