Sha256: a45cbb3fd88e6751aaa6aaf991195418c21b8166688884055b6530dafae187e8
Contents?: true
Size: 385 Bytes
Versions: 12
Compression:
Stored size: 385 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(/^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
12 entries across 12 versions & 1 rubygems