Class: TSV::StringArraySerializer
- Inherits:
-
Object
- Object
- TSV::StringArraySerializer
- Defined in:
- lib/rbbt/tsv/serializers.rb
Class Method Summary collapse
Class Method Details
.dump(array) ⇒ Object
52 53 54 |
# File 'lib/rbbt/tsv/serializers.rb', line 52 def self.dump(array) array.collect{|a| a.to_s} * "\t" end |
.load(string) ⇒ Object
56 57 58 59 60 |
# File 'lib/rbbt/tsv/serializers.rb', line 56 def self.load(string) return nil if string.nil? or string == 'nil' return [] if string.empty? string.split("\t", -1) end |