class Camdram::Image

Attributes

created_at[RW]
extension[RW]
filename[RW]
height[RW]
type[RW]
width[RW]

Public Instance Methods

info() click to toggle source

Return a hash of the image's attributes

@return [Hash] Hash with symbolized keys.

# File lib/camdram/image.rb, line 12
def info
  {
    id: id,
    filename: filename,
    created_at: created_at,
    width: width,
    height: height,
    extension: extension,
    type: type,
  }
end
url() click to toggle source

Return the image URL

@return [String] The image URL.

# File lib/camdram/image.rb, line 27
def url
  "/media/cache/preview/#{filename}"
end