Class: GallerySync::FilePhoto
- Defined in:
- lib/gallery_sync/gallery_sync.rb
Instance Attribute Summary
Attributes inherited from Photo
Instance Method Summary collapse
- #file ⇒ Object
- #full_url ⇒ Object
-
#initialize(album, name, filepath) ⇒ FilePhoto
constructor
A new instance of FilePhoto.
- #medium_url ⇒ Object
- #rm ⇒ Object
- #thumb_url ⇒ Object
- #to_s ⇒ Object
Methods inherited from Photo
Constructor Details
#initialize(album, name, filepath) ⇒ FilePhoto
Returns a new instance of FilePhoto.
235 236 237 238 |
# File 'lib/gallery_sync/gallery_sync.rb', line 235 def initialize(album,name,filepath) super(album,name) @filepath = filepath end |
Instance Method Details
#file ⇒ Object
260 261 262 |
# File 'lib/gallery_sync/gallery_sync.rb', line 260 def file File.open(@filepath,"rb") {|io| io.read} end |
#full_url ⇒ Object
252 253 254 |
# File 'lib/gallery_sync/gallery_sync.rb', line 252 def full_url @filepath end |
#medium_url ⇒ Object
248 249 250 |
# File 'lib/gallery_sync/gallery_sync.rb', line 248 def medium_url @filepath end |
#rm ⇒ Object
240 241 242 |
# File 'lib/gallery_sync/gallery_sync.rb', line 240 def rm File.delete @filepath end |
#thumb_url ⇒ Object
244 245 246 |
# File 'lib/gallery_sync/gallery_sync.rb', line 244 def thumb_url @filepath end |
#to_s ⇒ Object
256 257 258 |
# File 'lib/gallery_sync/gallery_sync.rb', line 256 def to_s "#{name} (#{@filepath})" end |