Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/string_base64.rb

Instance Method Summary collapse

Instance Method Details

#to_base64String

Convert string to Base64 representation

Returns:

  • (String)

    Base64 of string



8
9
10
# File 'lib/string_base64.rb', line 8

def to_base64
  Base64.encode64(self)
end

#to_base64_decodeString

Convert Base64 to string representation

Returns:

  • (String)

    string of Base64



14
15
16
# File 'lib/string_base64.rb', line 14

def to_base64_decode
  Base64.decode64(self)
end