Sha256: c27415ec2381c67aa2f4a603d795e5fff431727240a7cf2ed202065c1031cf62
Contents?: true
Size: 384 Bytes
Versions: 13
Compression:
Stored size: 384 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(/^http/) 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
13 entries across 13 versions & 3 rubygems