Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/certificate-transparency/extensions/string.rb

Overview

Extensions to the String class.

Instance Method Summary collapse

Instance Method Details

#base64Object

Return a new string, which is simply the object base64 encoded.



6
7
8
# File 'lib/certificate-transparency/extensions/string.rb', line 6

def base64
	[self.to_s].pack("m0")
end

#unbase64Object

Return a new string, which is simply the object base64 decoded.



12
13
14
# File 'lib/certificate-transparency/extensions/string.rb', line 12

def unbase64
	self.to_s.unpack("m").first
end