extractula 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/extractula.rb +1 -1
- data/lib/extractula/oembed.rb +12 -2
- metadata +1 -1
data/lib/extractula.rb
CHANGED
data/lib/extractula/oembed.rb
CHANGED
@@ -20,6 +20,16 @@ module Extractula
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.max_width(width = nil)
|
24
|
+
@global_oembed_max_width = width if width
|
25
|
+
@global_oembed_max_width
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.max_height(height = nil)
|
29
|
+
@global_oembed_max_height = height if height
|
30
|
+
@global_oembed_max_height
|
31
|
+
end
|
32
|
+
|
23
33
|
module ClassMethods
|
24
34
|
def oembed_endpoint(url = nil)
|
25
35
|
if url
|
@@ -36,12 +46,12 @@ module Extractula
|
|
36
46
|
|
37
47
|
def oembed_max_width(width = nil)
|
38
48
|
@oembed_max_width = width if width
|
39
|
-
@oembed_max_width
|
49
|
+
@oembed_max_width || OEmbed.max_width
|
40
50
|
end
|
41
51
|
|
42
52
|
def oembed_max_height(height = nil)
|
43
53
|
@oembed_max_height = height if height
|
44
|
-
@oembed_max_height
|
54
|
+
@oembed_max_height || OEmbed.max_height
|
45
55
|
end
|
46
56
|
|
47
57
|
def oembed_format_param_required?
|