Sha256: 16c6a9bf52fb01c12ee1671aed21445cb3271fa3f2d51acc0c2ba334adcc1d10
Contents?: true
Size: 761 Bytes
Versions: 4
Compression:
Stored size: 761 Bytes
Contents
module StorageRoom # An Image with optional thumbnails class Image < File # Returns all valid ImageVersion identifiers for this Image def version_identifiers self[:@versions].keys end # Returns the URL of an Image or the URL of a version if a string or symbol is passed def url(name = nil) if name if version_identifiers.include?(name.to_s) self[:@versions][name.to_s][:@url] else raise "Invalid Image Version identifier: '#{name}' (must be #{version_identifiers.join(', ')})" end else self[:@url] end end # Are versions of the Image still being processed on the server? def processing? self[:@processing] end end end
Version data entries
4 entries across 4 versions & 1 rubygems