Sha256: 21af4fbc04973275a340c28a86809389ed0027274916621afc001409c18a3981
Contents?: true
Size: 416 Bytes
Versions: 9
Compression:
Stored size: 416 Bytes
Contents
class IMGKit 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) || @source.kind_of?(Tempfile) end def html? !(url? || file?) end def to_s file? ? @source.path : @source end end end
Version data entries
9 entries across 9 versions & 1 rubygems