lib/pdfkit/source.rb in pdfkit-0.4.6 vs lib/pdfkit/source.rb in pdfkit-0.5.0
- old
+ new
@@ -1,15 +1,13 @@
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/)
+ @source.is_a?(String) && @source.match(/\Ahttp/)
end
def file?
@source.kind_of?(File)
end
@@ -19,9 +17,7 @@
end
def to_s
file? ? @source.path : @source
end
-
end
-
-end
\ No newline at end of file
+end