Sha256: cf75662d75f3bac1973f6839c95e35be4c5ad9a68db686bca6813eec48858dcc
Contents?: true
Size: 288 Bytes
Versions: 7
Compression:
Stored size: 288 Bytes
Contents
require "base64" module Prez class DataUri attr_reader :type, :contents def initialize(type, contents) @type = type @contents = Base64.encode64 contents @contents.gsub! "\n", "" end def to_s "data:#{type};base64,#{contents}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems