Sha256: 6b181c9733598992c7a393f2395740ecd324ddfc2d4990a4ad52d70c0a7f46ba

Contents?: true

Size: 814 Bytes

Versions: 7

Compression:

Stored size: 814 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
    ActionView::Base.send :include, TopHat::HtmlHelper
    ActionView::Base.send :include, TopHat::TitleHelper
    ActionView::Base.send :include, TopHat::MetaHelper
    ActionView::Base.send :include, TopHat::StylesheetHelper
    ActionView::Base.send :include, TopHat::RobotsHelper
    ActionView::Base.send :include, TopHat::OpenGraphHelper
    ActionView::Base.send :include, TopHat::TwitterCardHelper
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tophat-2.2.1 lib/tophat.rb
tophat-2.2.0 lib/tophat.rb
tophat-2.1.0 lib/tophat.rb
tophat-2.0.0 lib/tophat.rb
tophat-1.7.2 lib/tophat.rb
tophat-1.7.1 lib/tophat.rb
tophat-1.7.0 lib/tophat.rb