Class: Oembed::Media

Inherits:
Providers show all
Defined in:
lib/oembed/media.rb

Instance Attribute Summary collapse

Attributes inherited from Providers

#sites

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Media

Returns a new instance of Media.



7
8
9
10
11
12
# File 'lib/oembed/media.rb', line 7

def initialize(url)
  @format = 'json'
  @url = url
  @sites = Oembed::Providers.new.sites 
  get_info
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



5
6
7
# File 'lib/oembed/media.rb', line 5

def format
  @format
end

#html(size = {}) ⇒ Object

Returns the value of attribute html.



5
6
7
# File 'lib/oembed/media.rb', line 5

def html
  @html
end

#media_urlObject

Returns the value of attribute media_url.



5
6
7
# File 'lib/oembed/media.rb', line 5

def media_url
  @media_url
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/oembed/media.rb', line 5

def title
  @title
end