Module: TopHat

Extended by:
TopHat
Included in:
TopHat
Defined in:
lib/tophat.rb,
lib/tophat/html.rb,
lib/tophat/meta.rb,
lib/tophat/reset.rb,
lib/tophat/title.rb,
lib/tophat/robots.rb,
lib/tophat/railtie.rb,
lib/tophat/version.rb,
lib/tophat/opengraph.rb,
lib/tophat/stylesheet.rb,
lib/tophat/twitter_card.rb

Defined Under Namespace

Modules: HtmlHelper, MetaHelper, OpenGraphHelper, Reset, RobotsHelper, StylesheetHelper, TitleHelper, TwitterCardHelper Classes: Railtie

Constant Summary collapse

VERSION =
'2.2.0'

Instance Method Summary collapse

Instance Method Details

#currentObject



15
16
17
# File 'lib/tophat.rb', line 15

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

#resetObject



19
20
21
# File 'lib/tophat.rb', line 19

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

#setupObject



23
24
25
26
27
28
29
30
31
# File 'lib/tophat.rb', line 23

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