Sha256: 23a37a6e28e4745eed73e2e474e8c2736b5e6b32b695f06061eca1672b959878

Contents?: true

Size: 283 Bytes

Versions: 12

Compression:

Stored size: 283 Bytes

Contents

module Toy
  module Extensions
    module Set
      def store_default
        [].to_set
      end

      def to_store(value, *)
        Marshal.dump(value)
      end

      def from_store(value, *)
        value.nil? ? store_default : Marshal.load(value)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
toy-dynamo-0.0.12 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.11 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.10 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.9 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.8 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.7 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.6 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.5 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.4 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.3 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.2 lib/toy/dynamo/extensions/set.rb
toy-dynamo-0.0.1 lib/toy/dynamo/extensions/set.rb