class Xommelier::DS::CryptoBinary

Public Class Methods

from_xommelier(value) click to toggle source
# File lib/xommelier/ds.rb, line 20
def self.from_xommelier(value)
  return unless value
  case value
  when %r(\A[a-zA-Z0-9+/]={0,2}\Z)
    new Base64.decode64(value)
  when String
    new value
  else
    new value.to_s
  end
end

Public Instance Methods

inspect() click to toggle source
# File lib/xommelier/ds.rb, line 32
def inspect
  %(#<#{self.class.name} "#{self}">)
end
raw() click to toggle source
# File lib/xommelier/ds.rb, line 36
def raw
  __getobj__
end
to_xommelier() click to toggle source
# File lib/xommelier/ds.rb, line 42
def to_xommelier
  Base64.encode64(raw)
end