lib/flickry/photo.rb in wideopenspaces-flickry-0.1.6 vs lib/flickry/photo.rb in wideopenspaces-flickry-0.2.0

- old
+ new

@@ -16,11 +16,15 @@ :usage => [:canblog, :candownload, :canprint], :visibility => [:isfamily, :isfriend, :ispublic] }) self.location = Flickry::Location.new(foto.respond_to?(:location) ? foto.location : nil) self.owner = Flickry::Person.new(foto.respond_to?(:owner) ? foto.owner : nil) - + + _tags = self.tags.dup + self.tags = _tags.collect do |t| + Flickry::Tag.new(t) + end end # Lazily fetches the photo's sizes when called, memoizes so later calls are faster... def sizes @sizes ||= Flickry::Sizes.new(flickr.photos.getSizes(:photo_id => self.photo_id)) @@ -39,9 +43,14 @@ @comments << Flickry::Comment.new(comment) end end return @comments end + + # Join tags into a single string + def tag_list(separator = ', ') + self.tags.join(separator) + end def visible_to_family? self.visibility.isfamily == 1 end \ No newline at end of file