Class: GallerySync::Photo

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

Direct Known Subclasses

DropboxPhoto, FilePhoto, S3Photo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(album, name) ⇒ Photo

Returns a new instance of Photo.



212
213
214
215
# File 'lib/gallery_sync/gallery_sync.rb', line 212

def initialize(album, name)
  @album = album
  @name = name
end

Instance Attribute Details

#albumObject (readonly)

Returns the value of attribute album.



211
212
213
# File 'lib/gallery_sync/gallery_sync.rb', line 211

def album
  @album
end

Instance Method Details

#==(another_photo) ⇒ Object



225
226
227
# File 'lib/gallery_sync/gallery_sync.rb', line 225

def ==(another_photo)
  @name == another_photo.name
end

#nameObject



217
218
219
# File 'lib/gallery_sync/gallery_sync.rb', line 217

def name
  @name
end

#pathObject



221
222
223
# File 'lib/gallery_sync/gallery_sync.rb', line 221

def path
  "#{@album.name}/#{@name}"
end

#to_sObject



229
230
231
# File 'lib/gallery_sync/gallery_sync.rb', line 229

def to_s
  @name
end