lib/onebox/engine.rb in onebox-1.8.22 vs lib/onebox/engine.rb in onebox-1.8.23
- old
+ new
@@ -24,11 +24,10 @@
opt = opt.to_h if opt.instance_of?(OpenStruct)
@options.merge!(opt)
@options
end
-
def initialize(link, cache = nil, timeout = nil)
@options = DEFAULT
class_name = self.class.name.split("::").last.to_s
self.options = Onebox.options[class_name] || {} #Set the engine options extracted from global options.
@@ -80,16 +79,16 @@
def data
fail NoMethodError, "Engines need this method defined"
end
def link
- @url.gsub(/['\"&<>]/, {
+ @url.gsub(/['\"&<>]/,
"'" => ''',
'&' => '&',
'"' => '"',
'<' => '<',
'>' => '>',
- })
+ )
end
def always_https?
self.class.always_https?
end