Sha256: b452d267d4d7290e3d2a5b344b739350ec46f171dc3f9cee8282e35ca9101944

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

module Serializer
  REGEX = /(\d+[\.\d]*)[ xX"]+(\d+[\.\d]*)/

  def self.serialize_raw_sizes
    raw_text = File.readlines(File.expand_path('../../../db/size_data_raw.txt', __FILE__))
    new_text = []
    raw_text.each do |line|
      REGEX.match(line)
      new_text << DSF::Size.new($1,$2)
    end
    File.write(File.expand_path('../../../db/sizes_serial', __FILE__), Marshal::dump(new_text.uniq))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dsfu-0.0.1 lib/dsfu/serializer.rb