Sha256: da7fd4b835d2d580a809faaf19ba9cb81a5604796d976f14a884a5e7818da0fe
Contents?: true
Size: 293 Bytes
Versions: 1
Compression:
Stored size: 293 Bytes
Contents
require 'open-uri' module Bijo class Image def initialize(image_url) @image_url = image_url end def extension extension_regexp = /(.*)(?:(\.[^.]+$))/ @image_url.match(extension_regexp)[2] end def content open(@image_url).read end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bijo-0.0.1 | lib/bijo/image.rb |