Class: RubyPicasa::Album

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_picasa/types.rb

Overview

Includes attributes and associations defined on Base, plus:

attributes :published,
  :summary,
  :rights,
  :name,
  :access,
  :numphotos, # number of pictures in this album
  :total_results, # number of pictures matching this 'search'
  :start_index,
  :items_per_page,
  :allow_downloads
has_many :entries, :Photo, 'entry'

Direct Known Subclasses

Search

Instance Method Summary collapse

Methods inherited from Base

#feed, #link, #next, #previous, #session, #session=, #thumbnail, #url

Instance Method Details

#photos(options = {}) ⇒ Object

The current page of photos in the album.



220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/ruby_picasa/types.rb', line 220

def photos(options = {})
  if entries.blank? and !@photos_requested
    @photos_requested = true
    if session and data = feed
      self.entries = data.entries 
    else
      []
    end
  else
    entries
  end
end

#private?Boolean

True if this album’s rights are set to private

Returns:

  • (Boolean)


215
216
217
# File 'lib/ruby_picasa/types.rb', line 215

def private?
  rights == 'private'
end

#public?Boolean

True if this album’s rights are set to public

Returns:

  • (Boolean)


210
211
212
# File 'lib/ruby_picasa/types.rb', line 210

def public?
  rights == 'public'
end