Module: HTML::Mixin::TagHandler

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

Overview

The TagHandler module implements handling for standard html physical tags.

Instance Method Summary collapse

Instance Method Details

#big(bool = nil) ⇒ Object



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

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

#big=(bool) ⇒ Object



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

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


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

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

#blink=(bool) ⇒ Object



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

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



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

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

#bold=(bool) ⇒ Object



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

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

#italic(bool = nil) ⇒ Object



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

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

#italic=(bool) ⇒ Object



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

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

#strike(bool = nil) ⇒ Object



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

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

#strike=(bool) ⇒ Object



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

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

#sub(bool = nil) ⇒ Object



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

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

#sub=(bool) ⇒ Object



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

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

#sup(bool = nil) ⇒ Object



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

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

#sup=(bool) ⇒ Object



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

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

#tt(bool = nil) ⇒ Object



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

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

#tt=(bool) ⇒ Object



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

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

#underline(bool = nil) ⇒ Object



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

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

#underline=(bool) ⇒ Object



110
111
112
113
# File 'lib/html/mixin/tag_handler.rb', line 110

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