Sha256: e3e9d38075040f1684f58c55b9a7b5a887ed35b5ecb504e61e2498eac6fb39a6
Contents?: true
Size: 352 Bytes
Versions: 2
Compression:
Stored size: 352 Bytes
Contents
module GoogleBook class Images attr_accessor :url def initialize(url) self.url = url end def thumbnail url end def small zoom(1) end def medium zoom(2) end def large zoom(3) end private def zoom(level) url.gsub('zoom=5', "zoom=#{level}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
googlebook-0.1.1 | lib/googlebook/images.rb |
googlebook-0.1.0 | lib/googlebook/images.rb |