Class: GallerySync::S3Photo

Inherits:
Photo
  • Object
show all
Defined in:
lib/gallery_sync/gallery_sync.rb

Instance Attribute Summary

Attributes inherited from Photo

#album

Instance Method Summary collapse

Methods inherited from Photo

#==, #name, #path, #to_s

Constructor Details

#initialize(album, name, s3_path, gallery) ⇒ S3Photo

Returns a new instance of S3Photo.



283
284
285
286
287
# File 'lib/gallery_sync/gallery_sync.rb', line 283

def initialize(album,name,s3_path, gallery)
  super(album,name)
  @s3_path = s3_path
  @gallery = gallery
end

Instance Method Details

#full_urlObject



303
304
305
306
# File 'lib/gallery_sync/gallery_sync.rb', line 303

def full_url
  key = album.name + "/full/" + name
  @gallery.bucket.objects[key].public_url(:secure => false).to_s
end

#medium_urlObject



298
299
300
301
# File 'lib/gallery_sync/gallery_sync.rb', line 298

def medium_url
  key = album.name + "/medium/" + name
  @gallery.bucket.objects[key].public_url(:secure => false).to_s
end

#s3_pathObject



289
290
291
# File 'lib/gallery_sync/gallery_sync.rb', line 289

def s3_path
  @s3_path
end

#thumb_urlObject



293
294
295
296
# File 'lib/gallery_sync/gallery_sync.rb', line 293

def thumb_url
  key = album.name + "/thumb/" + name
  @gallery.bucket.objects[key].public_url(:secure => false).to_s
end