Class: Camdram::Image
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#height ⇒ Object
Returns the value of attribute height.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes included from API
Attributes inherited from Base
Instance Method Summary collapse
-
#info ⇒ Hash
Return a hash of the image's attributes.
-
#url ⇒ String
Return the image URL.
Methods included from API
Methods inherited from Base
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def created_at @created_at end |
#extension ⇒ Object
Returns the value of attribute extension.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def extension @extension end |
#filename ⇒ Object
Returns the value of attribute filename.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def filename @filename end |
#height ⇒ Object
Returns the value of attribute height.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def height @height end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/camdram/image.rb', line 7 def width @width end |
Instance Method Details
#info ⇒ Hash
Return a hash of the image's attributes
12 13 14 15 16 17 18 19 20 21 22 |
# 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 ⇒ String
Return the image URL
27 28 29 |
# File 'lib/camdram/image.rb', line 27 def url "/media/cache/preview/#{filename}" end |