Class: TSVAdapter::StringArraySerializer
- Inherits:
-
Object
- Object
- TSVAdapter::StringArraySerializer
- Defined in:
- lib/scout/persist/tsv/serialize.rb
Class Method Summary collapse
Class Method Details
.dump(array) ⇒ Object
52 53 54 |
# File 'lib/scout/persist/tsv/serialize.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/scout/persist/tsv/serialize.rb', line 56 def self.load(string) return nil if string.nil? or string == 'nil' return [] if string.empty? string.split("\t", -1) end |