Module: Imgproxy::OptionsCasters::Base64
- Defined in:
- lib/imgproxy/options_casters/base64.rb
Overview
Casts string option to base64
Class Method Summary collapse
Class Method Details
.cast(raw) ⇒ Object
7 8 9 |
# File 'lib/imgproxy/options_casters/base64.rb', line 7 def self.cast(raw) ::Base64.urlsafe_encode64(raw.to_s).tr("=", "") unless raw.nil? end |