Class: PicasaDownloader::Photo
- Inherits:
-
Object
- Object
- PicasaDownloader::Photo
- Defined in:
- lib/picasa-downloader/photo.rb
Instance Attribute Summary collapse
-
#created_date ⇒ Object
readonly
Returns the value of attribute created_date.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #has_video? ⇒ Boolean
-
#initialize(url, created_date_since_epoch, size, name) ⇒ Photo
constructor
A new instance of Photo.
Constructor Details
#initialize(url, created_date_since_epoch, size, name) ⇒ Photo
Returns a new instance of Photo.
5 6 7 8 9 10 |
# File 'lib/picasa-downloader/photo.rb', line 5 def initialize(url, created_date_since_epoch, size, name) @url = url @created_date = Time.at(created_date_since_epoch) @size = size @name = name end |
Instance Attribute Details
#created_date ⇒ Object (readonly)
Returns the value of attribute created_date.
3 4 5 |
# File 'lib/picasa-downloader/photo.rb', line 3 def created_date @created_date end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/picasa-downloader/photo.rb', line 3 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
3 4 5 |
# File 'lib/picasa-downloader/photo.rb', line 3 def size @size end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/picasa-downloader/photo.rb', line 3 def url @url end |
Instance Method Details
#has_video? ⇒ Boolean
12 13 14 |
# File 'lib/picasa-downloader/photo.rb', line 12 def has_video? @url.include?'googlevideo' end |