Sha256: 9bb361a703c5df861220c4f9d0514cb9544842a69c6d3ef7721062445ced91a9
Contents?: true
Size: 628 Bytes
Versions: 21
Compression:
Stored size: 628 Bytes
Contents
# Copyright 2020 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. # frozen_string_literal: true module ActiveRecord module Type module Spanner class Bytes < ActiveRecord::Type::Binary def serialize value return super value if value.nil? if value.respond_to?(:read) && value.respond_to?(:rewind) value.rewind value = value.read end Base64.strict_encode64 value.force_encoding("ASCII-8BIT") end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems