Sha256: cbc9cef2b064011a13231faaf7d16505d91d70f97b60436986ce8287e9a3b80d
Contents?: true
Size: 366 Bytes
Versions: 16
Compression:
Stored size: 366 Bytes
Contents
class PDFKit class Source def initialize(url_file_or_html) @source = url_file_or_html end def url? @source.is_a?(String) && @source.match(/\Ahttp/) end def file? @source.kind_of?(File) end def html? !(url? || file?) end def to_s file? ? @source.path : @source end end end
Version data entries
16 entries across 16 versions & 3 rubygems