module Onebox::Engine::ClassMethods
Public Instance Methods
===(other)
click to toggle source
Calls superclass method
# File lib/onebox/engine.rb, line 101 def ===(other) if other.kind_of?(URI) !!(other.to_s =~ class_variable_get(:@@matcher)) else super end end
always_https()
click to toggle source
# File lib/onebox/engine.rb, line 130 def always_https @https = true end
always_https?()
click to toggle source
# File lib/onebox/engine.rb, line 134 def always_https? defined?(@https) ? @https : false end
iframe_origins()
click to toggle source
# File lib/onebox/engine.rb, line 121 def iframe_origins class_variable_defined?(:@@iframe_origins) ? class_variable_get(:@@iframe_origins) : [] end
matches_regexp(r)
click to toggle source
# File lib/onebox/engine.rb, line 113 def matches_regexp(r) class_variable_set :@@matcher, r end
onebox_name()
click to toggle source
calculates a name for onebox using the class name of engine
# File lib/onebox/engine.rb, line 126 def onebox_name name.split("::").last.downcase.gsub(/onebox/, "") end
priority()
click to toggle source
# File lib/onebox/engine.rb, line 109 def priority 100 end
requires_iframe_origins(*origins)
click to toggle source
# File lib/onebox/engine.rb, line 117 def requires_iframe_origins(*origins) class_variable_set :@@iframe_origins, origins end