class WickedPdf::WickedPdfHelper::Assets::LocalAsset

Attributes

path[R]

Public Class Methods

new(path) click to toggle source
# File lib/wicked_pdf/wicked_pdf_helper/assets.rb, line 58
def initialize(path)
  @path = path
end

Public Instance Methods

content_type() click to toggle source
# File lib/wicked_pdf/wicked_pdf_helper/assets.rb, line 62
def content_type
  Mime::Type.lookup_by_extension(File.extname(path).delete('.'))
end
filename() click to toggle source
# File lib/wicked_pdf/wicked_pdf_helper/assets.rb, line 70
def filename
  path.to_s
end
to_s() click to toggle source
# File lib/wicked_pdf/wicked_pdf_helper/assets.rb, line 66
def to_s
  IO.read(path)
end