Class: Oembed::Uri

Inherits:
Object
  • Object
show all
Defined in:
lib/oembed/uri.rb

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_uri, resource_uri, params = {}) ⇒ Uri

Returns a new instance of Uri.



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

def initialize(endpoint_uri, resource_uri, params = {})
  @uri = URI.parse(endpoint_uri)
  @uri.query = URI.encode_www_form(params.merge(url: resource_uri))
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/oembed/uri.rb', line 10

def to_s
  @uri.to_s
end