--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: apply
- !ruby/object:RI::MethodSummary 
  name: configure
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sequel's built in Serialization plugin allows you to keep serialized ruby objects in the database, while giving you deserialized objects when you call an accessor.
- !ruby/struct:SM::Flow::P 
  body: This plugin works by keeping the serialized value in the values, and adding a @deserialized_values hash. The reader method for serialized columns will check the @deserialized_values for the value, return it if present, or deserialized the entry in @values and return it. The writer method will set the @deserialized_values entry. This plugin adds a before_save hook that serializes all @deserialized_values to @values.
- !ruby/struct:SM::Flow::P 
  body: You can use either marshal, yaml, or json as the serialization format. If you use yaml or json, you should require them by yourself.
- !ruby/struct:SM::Flow::P 
  body: Because of how this plugin works, it must be used inside each model class that needs serialization, after any set_dataset method calls in that class. Otherwise, it is possible that the default column accessors will take precedence.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'sequel'\n  require 'json'\n  class User &lt; Sequel::Model\n    plugin :serialization, :json, :permissions\n    # or\n    plugin :serialization\n    serialize_attributes :marshal, :permissions, :attributes\n  end\n  user = User.create\n  user.permissions = { :global =&gt; 'read-only' }\n  user.save\n"
constants: []

full_name: Sequel::Plugins::Serialization
includes: []

instance_methods: []

name: Serialization
superclass: 
