Class: Oembed::Uri
- Inherits:
-
Object
- Object
- Oembed::Uri
- Defined in:
- lib/oembed/uri.rb
Instance Method Summary collapse
-
#initialize(endpoint_uri, resource_uri, params = {}) ⇒ Uri
constructor
A new instance of Uri.
- #to_s ⇒ Object
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_s ⇒ Object
10 11 12 |
# File 'lib/oembed/uri.rb', line 10 def to_s @uri.to_s end |