module Onebox

Constants

DEFAULTS
VERSION

Public Class Methods

check(url, options = Onebox.options) click to toggle source
# File lib/onebox.rb, line 38
def self.check(url, options = Onebox.options)
  StatusCheck.new(url, options)
end
has_matcher?(url) click to toggle source
# File lib/onebox.rb, line 46
def self.has_matcher?(url)
  !!Matcher.new(url).oneboxed
end
options() click to toggle source
# File lib/onebox.rb, line 42
def self.options
  OpenStruct.new(@@options)
end
options=(options) click to toggle source
# File lib/onebox.rb, line 50
def self.options=(options)
  @@options = DEFAULTS.merge(options)
end
preview(url, options = Onebox.options) click to toggle source
# File lib/onebox.rb, line 29
def self.preview(url, options = Onebox.options)
  # onebox does not have native caching
  unless Onebox::Helpers.blank?(options[:cache])
    warn "Onebox no longer has inbuilt caching so `cache` option will be ignored."
  end

  Preview.new(url, options)
end