Module: Extractula::OEmbed
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: Response
Class Method Summary
collapse
Class Method Details
.max_height(height = nil) ⇒ Object
28
29
30
31
|
# File 'lib/extractula/oembed.rb', line 28
def self.max_height(height = nil)
@global_oembed_max_height = height if height
@global_oembed_max_height
end
|
.max_width(width = nil) ⇒ Object
23
24
25
26
|
# File 'lib/extractula/oembed.rb', line 23
def self.max_width(width = nil)
@global_oembed_max_width = width if width
@global_oembed_max_width
end
|
.request(request) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/extractula/oembed.rb', line 14
def self.request(request)
http_response = Typhoeus::Request.get(request)
if http_response.code == 200
Extractula::OEmbed::Response.new(http_response.body)
else
end
end
|