Sha256: 651e215630d2bbdab87b01c5ba88f92a035bf009341d2dad926488969b4b521a
Contents?: true
Size: 396 Bytes
Versions: 97
Compression:
Stored size: 396 Bytes
Contents
require 'yaml' module ActiveRecord module Wrappings #:nodoc: class YamlWrapper < AbstractWrapper #:nodoc: def wrap(attribute) attribute.to_yaml end def unwrap(attribute) YAML::load(attribute) end end module ClassMethods #:nodoc: # Wraps the attribute in Yaml encoding def wrap_in_yaml(*attributes) wrap_with(YamlWrapper, attributes) end end end end
Version data entries
97 entries across 97 versions & 5 rubygems