Module: TagHandler

Included in:
HTML::Table::Content
Defined in:
lib/html/tag_handler.rb

Overview

tag_handler.rb

Module for handling standard html physical tags (<b>, <i>, etc). Only used for Table::Content objects, which are in turn used by Table::Row::Data, Table::Row::Header and Table::Caption.

Instance Method Summary collapse

Instance Method Details

#big(bool = nil) ⇒ Object



20
21
22
23
24
# File 'lib/html/tag_handler.rb', line 20

def big(bool = nil)
  @big ||= nil
  self.big = bool if bool
  @big
end

#big=(bool) ⇒ Object



26
27
28
29
# File 'lib/html/tag_handler.rb', line 26

def big=(bool)
  handle_physical_tag('big', bool)
  @big = bool
end


31
32
33
34
35
# File 'lib/html/tag_handler.rb', line 31

def blink(bool = nil)
  @blink ||= nil
  self.blink = bool if bool
  @blink
end

#blink=(bool) ⇒ Object



37
38
39
40
41
# File 'lib/html/tag_handler.rb', line 37

def blink=(bool)
  warn BlinkWarning, "The 'blink' tag is very annoying. Please reconsider."
  handle_physical_tag('blink', bool)
  @blink = bool
end

#bold(bool = nil) ⇒ Object



9
10
11
12
13
# File 'lib/html/tag_handler.rb', line 9

def bold(bool = nil)
  @bold ||= nil
  self.bold = bool if bool
  @bold
end

#bold=(bool) ⇒ Object



15
16
17
18
# File 'lib/html/tag_handler.rb', line 15

def bold=(bool)
  handle_physical_tag('b', bool)
  @bold = bool
end

#italic(bool = nil) ⇒ Object



43
44
45
46
47
# File 'lib/html/tag_handler.rb', line 43

def italic(bool = nil)
  @italic ||= nil
  self.italic = bool if bool
  @italic
end

#italic=(bool) ⇒ Object



49
50
51
52
# File 'lib/html/tag_handler.rb', line 49

def italic=(bool)
  handle_physical_tag('i', bool)
  @italic = bool
end

#strike(bool = nil) ⇒ Object



54
55
56
57
58
# File 'lib/html/tag_handler.rb', line 54

def strike(bool = nil)
  @strike ||= nil
  self.strike = bool if bool
  @strike
end

#strike=(bool) ⇒ Object



60
61
62
63
# File 'lib/html/tag_handler.rb', line 60

def strike=(bool)
  handle_physical_tag('strike', bool)
  @strike = bool
end

#sub(bool = nil) ⇒ Object



65
66
67
68
69
# File 'lib/html/tag_handler.rb', line 65

def sub(bool = nil)
  @sub ||= nil
  self.sub = bool if bool
  @sub
end

#sub=(bool) ⇒ Object



71
72
73
74
# File 'lib/html/tag_handler.rb', line 71

def sub=(bool)
  handle_physical_tag('sub', bool)
  @sub = bool
end

#sup(bool = nil) ⇒ Object



76
77
78
79
80
# File 'lib/html/tag_handler.rb', line 76

def sup(bool = nil)
  @sup ||= nil
  self.sup = bool if bool
  @sup
end

#sup=(bool) ⇒ Object



82
83
84
85
# File 'lib/html/tag_handler.rb', line 82

def sup=(bool)
  handle_physical_tag('sup', bool)
  @sup = bool
end

#tt(bool = nil) ⇒ Object



87
88
89
90
91
# File 'lib/html/tag_handler.rb', line 87

def tt(bool = nil)
  @tt ||= nil
  self.tt = bool if bool
  @tt
end

#tt=(bool) ⇒ Object



93
94
95
96
# File 'lib/html/tag_handler.rb', line 93

def tt=(bool)
  handle_physical_tag('tt', bool)
  @tt = bool
end

#underline(bool = nil) ⇒ Object



98
99
100
101
102
# File 'lib/html/tag_handler.rb', line 98

def underline(bool = nil)
  @underline ||= nil
  self.underline = bool if bool
  @underline
end

#underline=(bool) ⇒ Object



104
105
106
107
# File 'lib/html/tag_handler.rb', line 104

def underline=(bool)
  handle_physical_tag('u', bool)
  @bool = bool
end