Sha256: c7c047b9f2078f43ceb6ed1f8eb132279b7b0d29d753528a083b92d7a181d782

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

module Transcriber
  class Resource
    module Serialization
      class Integer
        def self.serialize(value)
          Integer(value)
        rescue ArgumentError
          raise "value not serializable: #{value}"
        end

        def self.desserialize(value)
          Integer(value)
        rescue ArgumentError
          raise "value not desserializable: #{value}"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transcriber-0.0.26 lib/transcriber/resource/serialization/integer.rb