Method: Brief::Document::Attachments#render_attachments

Defined in:
lib/brief/document/attachments.rb

#render_attachmentsObject



21
22
23
24
25
26
27
28
# File 'lib/brief/document/attachments.rb', line 21

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