Sha256: 56cb2faaf138f10a7df6e45e8ec39d94399f8afde89cd39229b1db10e2df8dc5

Contents?: true

Size: 710 Bytes

Versions: 3

Compression:

Stored size: 710 Bytes

Contents

require 'action_view'
require 'tophat/html'
require 'tophat/title'
require 'tophat/meta'
require 'tophat/stylesheet'
require 'tophat/robots'
require 'tophat/opengraph'
require 'tophat/twitter_card'

module TopHat
  extend self

  require "tophat/railtie" if defined?(::Rails)

  def current
    Thread.current[:tophat] ||= {}
  end

  def reset
    Thread.current[:tophat] = {}
  end

  def setup
    ActiveSupport.on_load(:action_view) do
      include TopHat::HtmlHelper
      include TopHat::TitleHelper
      include TopHat::MetaHelper
      include TopHat::StylesheetHelper
      include TopHat::RobotsHelper
      include TopHat::OpenGraphHelper
      include TopHat::TwitterCardHelper
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/tophat-2.3.1/lib/tophat.rb
tophat-2.3.1 lib/tophat.rb
tophat-2.3.0 lib/tophat.rb