Sha256: 5a8c6ad17ace46b2d2aad0025cf961a2e2d4a3d5487b8057fc6eca95aacefb15

Contents?: true

Size: 459 Bytes

Versions: 4

Compression:

Stored size: 459 Bytes

Contents

module OEmbed
  class Response
    # A Response used for representing static photos.
    class Photo < self
      # Returns an <img> tag pointing at the appropraite URL.
      def html
        "<img src='" + self.url + "' />"
      end
      
      private
      
      # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3]
      def must_override
        %w{
          url width height
        } + super
      end
      
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-oembed-0.8.7 lib/oembed/response/photo.rb
ruby-oembed-0.8.5 lib/oembed/response/photo.rb
ruby-oembed-0.8.3 lib/oembed/response/photo.rb
ruby-oembed-0.8.1 lib/oembed/response/photo.rb