Method: Onebox::Matcher#oneboxed

Defined in:
lib/onebox/matcher.rb

#oneboxedObject



20
21
22
23
24
25
# File 'lib/onebox/matcher.rb', line 20

def oneboxed
  return if @uri.nil?
  return if @uri.port && !Onebox.options.allowed_ports.include?(@uri.port)
  return if @uri.scheme && !Onebox.options.allowed_schemes.include?(@uri.scheme)
  ordered_engines.find { |engine| engine === @uri && has_allowed_iframe_origins?(engine) }
end