Class: TSV::StringArraySerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/rbbt/tsv/serializers.rb

Class Method Summary collapse

Class Method Details

.dump(array) ⇒ Object



34
35
36
# File 'lib/rbbt/tsv/serializers.rb', line 34

def self.dump(array)
  array.collect{|a| a.to_s} * "\t"
end

.load(string) ⇒ Object



38
39
40
41
# File 'lib/rbbt/tsv/serializers.rb', line 38

def self.load(string)
  return [] if string.nil?
  string.split("\t", -1)
end