16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/headliner/helper.rb', line 16
def display_title(options)
if options[:prefix]
prefix = options[:prefix]
elsif options[:prefix] == false
prefix = ''
else
prefix = ' '
end
unless options[:separator].blank?
separator = options[:separator]
else
separator = '|'
end
if options[:suffix]
suffix = options[:suffix]
elsif options[:suffix] == false
suffix = ''
else
suffix = ' '
end
if options[:lowercase] == true
@title = @title.downcase unless @title.blank?
end
unless @title.blank?
if options[:reverse] == true
return tag(:title, @title + prefix + separator + suffix + options[:site])
else
return tag(:title, options[:site] + prefix + separator + suffix + @title)
end
end
tag :title, options[:site]
end
|