Sha256: 647ca260ed5d6ad441aae87c001b4cbe78df8ab2316b8e572667bb52e9323550

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

module ActiveData
  module Model
    module Serializable

      class UnknownAttribute < ::StandardError
      end

      def serialize value, type
        type.modelize(value)
      end

      def deserialize value
        value.respond_to? :demodelize ? value.demodelize : value.to_s
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_data-0.0.1 lib/active_data/model/serializable.rb