Sha256: ceb1b0744f9cb62fe01519563cb03d229581e498a5ad2d228cc41033f3bb46ab

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 Bytes

Contents

require "picasa/presenter/base"

module Picasa
  module Presenter
    class Media < Base
      # @return [Array<Presenter::Thumbnail>]
      def thumbnails
        @thumbnails ||= safe_retrieve(parsed_body, "media$thumbnail").map { |thumbnail| Thumbnail.new(thumbnail) }
      end

      # @return [String]
      def credit
        @credit ||= parsed_body["media$credit"][0]["$t"]
      end

      # @return [String]
      def description
        @description ||= safe_retrieve(parsed_body, "media$description", "$t")
      end

      # @return [String]
      def keywords
        @keywords ||= safe_retrieve(parsed_body, "media$keywords", "$t")
      end

      # @return [String]
      def title
        @title ||= safe_retrieve(parsed_body, "media$title", "$t")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picasa-0.6.1 lib/picasa/presenter/media.rb
picasa-0.6.0 lib/picasa/presenter/media.rb