Class: Platanus::Serializers::TagSet

Inherits:
Object
  • Object
show all
Defined in:
lib/platanus/serializers/tag_set.rb

Class Method Summary collapse

Class Method Details

.dump(_data) ⇒ Object



17
18
19
# File 'lib/platanus/serializers/tag_set.rb', line 17

def self.dump(_data)
  "::#{_data.join('::')}::"
end

.load(_str) ⇒ Object



11
12
13
14
15
# File 'lib/platanus/serializers/tag_set.rb', line 11

def self.load(_str)
  return [] if _str.nil?
  return [] if _str == '::::'
  _str.split('::')[1..-1]
end