Class: PicasaDownloader::Photo

Inherits:
Object
  • Object
show all
Defined in:
lib/picasa-downloader/photo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dateObject (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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/picasa-downloader/photo.rb', line 3

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



3
4
5
# File 'lib/picasa-downloader/photo.rb', line 3

def size
  @size
end

#urlObject (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/picasa-downloader/photo.rb', line 12

def has_video?
  @url.include?'googlevideo'
end