Sha256: f6df87060961ca7b434868cf2523117e34dfde93df3b327f9a998bf32bef2f9e

Contents?: true

Size: 225 Bytes

Versions: 10

Compression:

Stored size: 225 Bytes

Contents

# Encodes and decodes binary data.
module BinarySerializer
  def self.encode(raw)
    return raw if raw.blank?
    raw.unpack("B*")[0]
  end

  def self.decode(raw)
    return raw if raw.blank?
    [raw].pack("B*")
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vault-rails-0.8.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.7.1 spec/dummy/lib/binary_serializer.rb
vault-rails-0.7.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.6.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.5.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.4.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.3.2 spec/dummy/lib/binary_serializer.rb
vault-rails-0.3.1 spec/dummy/lib/binary_serializer.rb
vault-rails-0.3.0 spec/dummy/lib/binary_serializer.rb
vault-rails-0.2.0 spec/dummy/lib/binary_serializer.rb