Sha256: 7fd4a39efafe86f4afe0abb557fdfb3f137d4b4cad7259b8d9fbf3af74656114
Contents?: true
Size: 397 Bytes
Versions: 8
Compression:
Stored size: 397 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
8 entries across 8 versions & 1 rubygems