lib/onebox/engine.rb in onebox-1.6.1 vs lib/onebox/engine.rb in onebox-1.6.2

- old
+ new

@@ -19,21 +19,17 @@ @options end def options=(opt) return @options if opt.nil? #make sure options provided - if opt.instance_of? OpenStruct - @options = @options.merge(opt.to_h) - else - @options = @options.merge(opt) - end + 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. @url = link @@ -166,5 +162,7 @@ require_relative "engine/xkcd_onebox" require_relative "engine/giphy_onebox" require_relative "engine/gfycat_onebox" require_relative "engine/vimeo_onebox" require_relative "engine/steam_store_onebox" +require_relative "engine/sketchfab_onebox" +require_relative "engine/audioboom_onebox"