Class: OEmbed::Response::Photo

Inherits:
OEmbed::Response show all
Defined in:
lib/oembed/response/photo.rb

Overview

A Response used for representing static photos.

Instance Attribute Summary

Attributes inherited from OEmbed::Response

#fields, #format, #provider, #request_url

Instance Method Summary collapse

Methods inherited from OEmbed::Response

create_for, #field, #initialize, #link?, #photo?, #rich?, #video?

Constructor Details

This class inherits a constructor from OEmbed::Response

Instance Method Details

#htmlObject

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



6
7
8
# File 'lib/oembed/response/photo.rb', line 6

def html
  "<img src='#{self.url}' alt='#{(self.respond_to?(:title) ? self.title : nil)}' />"
end