Module: TopHat::RobotsHelper

Defined in:
lib/tophat/robots.rb

Constant Summary collapse

DEFAULT_DESCRIPTOR =
'robots'

Instance Method Summary collapse

Instance Method Details

#canonical(path = nil) ⇒ Object



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

def canonical(path=nil)
  tag(:link, :rel => 'canonical', :href => path) if path
end

#nofollow(descriptor = DEFAULT_DESCRIPTOR) ⇒ Object



11
12
13
14
# File 'lib/tophat/robots.rb', line 11

def nofollow(descriptor=DEFAULT_DESCRIPTOR)
  descriptor ||= DEFAULT_DESCRIPTOR
  tag(:meta, :name => descriptor, :content => 'nofollow')
end

#noindex(descriptor = DEFAULT_DESCRIPTOR) ⇒ Object



6
7
8
9
# File 'lib/tophat/robots.rb', line 6

def noindex(descriptor=DEFAULT_DESCRIPTOR)
  descriptor ||= DEFAULT_DESCRIPTOR
  tag(:meta, :name => descriptor, :content => 'noindex')
end