Sha256: dfe3281bfb51c91f702ebc2c348fe6a36e97757f1d26b06aa2c094fce8dfaad3
Contents?: true
Size: 615 Bytes
Versions: 1
Compression:
Stored size: 615 Bytes
Contents
module Zencoder module Serializer extend self def self.included(klass) klass.extend(self) end def encode(content) if content.is_a?(String) || content.nil? content else if MultiJson.respond_to?(:dump) MultiJson.dump(content) else MultiJson.encode(content) end end end def decode(content) if content.is_a?(String) if MultiJson.respond_to?(:load) MultiJson.load(content) else MultiJson.decode(content) end else content end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zencoder-2.4.1 | lib/zencoder/serializer.rb |