Class: Belvo::Utils
- Inherits:
-
Object
- Object
- Belvo::Utils
- Defined in:
- lib/belvo/utils.rb
Overview
Class with helper functions
Class Method Summary collapse
Class Method Details
.read_file_to_b64(path) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/belvo/utils.rb', line 8 def self.read_file_to_b64(path) return if path.nil? || !File.file?(path) data = File.open(path).read Base64.encode64(data) end |