Class: GallerySync::Photo
- Inherits:
-
Object
- Object
- GallerySync::Photo
show all
- Defined in:
- lib/gallery_sync/gallery_sync.rb
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
#album ⇒ Object
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
|
#name ⇒ Object
217
218
219
|
# File 'lib/gallery_sync/gallery_sync.rb', line 217
def name
@name
end
|
#path ⇒ Object
221
222
223
|
# File 'lib/gallery_sync/gallery_sync.rb', line 221
def path
"#{@album.name}/#{@name}"
end
|
#to_s ⇒ Object
229
230
231
|
# File 'lib/gallery_sync/gallery_sync.rb', line 229
def to_s
@name
end
|