Class: Rapuncel::Base64String

Inherits:
String
  • Object
show all
Defined in:
lib/rapuncel/base_64_string.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from String

#as_base64

Class Method Details

.decode_base64(string) ⇒ Object



20
21
22
# File 'lib/rapuncel/base_64_string.rb', line 20

def self.decode_base64 string
  new string.unpack('m')[0]
end

Instance Method Details

#base64_encodedObject



16
17
18
# File 'lib/rapuncel/base_64_string.rb', line 16

def base64_encoded
  [self].pack 'm'
end