Sha256: e9b701c221a5e1a29abf681b55184855dd9bc3323c15ec32ccc342612015143d
Contents?: true
Size: 690 Bytes
Versions: 56
Compression:
Stored size: 690 Bytes
Contents
module Brief class Document module Attachments def has_attachments? attachments.length > 0 end def attachments Array(data.attachments) end def attachment_paths attachments.reduce({}.to_mash) do |memo, name| if asset = briefcase.find_asset(name) memo[name] = asset.realpath.to_s memo end end end def render_attachments attachments.reduce({}.to_mash) do |memo, name| if asset = briefcase.find_asset(name) memo[name] = IO.read(asset) if asset.to_s.match(/\.svg/i) memo end end end end end end
Version data entries
56 entries across 56 versions & 1 rubygems