Class: Moneta::Transforms::UrlsafeBase64

Inherits:
Base64 show all
Defined in:
lib/moneta/transforms/urlsafebase64.rb

Overview

Encodes strings in URL-safe Base64. This is a convenience wrapper around Base64.

Instance Method Summary collapse

Methods inherited from Base64

#decode, #encode

Methods inherited from Moneta::Transform

#decodable?, #decode, delegate_to, #encode, #method_missing, #respond_to_missing?

Constructor Details

#initialize(padding: true, **options) ⇒ UrlsafeBase64

Returns a new instance of UrlsafeBase64.

Parameters:

  • padding (Boolean) (defaults to: true)

    whether to include padding at the end of the Base64 string



6
7
8
# File 'lib/moneta/transforms/urlsafebase64.rb', line 6

def initialize(padding: true, **options)
  super(url_safe: true, strict: false, padding: padding, **options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Moneta::Transform