class OEmbed::Response::Photo

A Response used for representing static photos.

Public Instance Methods

html() click to toggle source

Returns an <img> tag pointing at the appropraite URL.

# File lib/oembed/response/photo.rb, line 6
def html
  "<img src='#{self.url}' alt='#{(self.respond_to?(:title) ? self.title : nil)}' />"
end

Private Instance Methods

must_override() click to toggle source

See section 2.3.4.1 of the oEmbed spec

Calls superclass method
# File lib/oembed/response/photo.rb, line 13
def must_override
  %w{
    url width height
  } + super
end