Module: Typekit::Collection::Serialization

Included in:
Base
Defined in:
lib/typekit/collection/serialization.rb

Instance Method Summary collapse

Instance Method Details

#serializeObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/typekit/collection/serialization.rb', line 4

def serialize
  result = nil

  if klass.feature?(:serialization)
    result = elements.map(&:serialize)
    # FIXME: A nasty hack to empty collections.
    result = '' if result.empty?
  end

  result
end