Class: Muwu::RenderHtmlPartial::Title
- Inherits:
-
Object
- Object
- Muwu::RenderHtmlPartial::Title
show all
- Includes:
- Muwu
- Defined in:
- lib/muwu/render_html_partial/render_title.rb
Constant Summary
Constants included
from Muwu
GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Muwu
debug, read
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
9
10
11
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 9
def destination
@destination
end
|
Returns the value of attribute metadata.
9
10
11
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 9
def metadata
@metadata
end
|
Instance Method Details
#render ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 15
def render
@destination.margin_to_zero
@destination.padding_vertical(1) do
write_tag_div_open
render_title_metadata
write_tag_div_close
end
@destination.margin_to_zero
end
|
26
27
28
29
30
31
32
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 26
def render_title_metadata
@destination.margin_indent do
@metadata.each_pair do |key, value|
write_tag_h1(key, value)
end
end
end
|
#write_tag_div_close ⇒ Object
35
36
37
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 35
def write_tag_div_close
@destination.write_line tag_div_close
end
|
#write_tag_div_open ⇒ Object
40
41
42
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 40
def write_tag_div_open
@destination.write_line tag_div_open
end
|
#write_tag_h1(key, value) ⇒ Object
45
46
47
|
# File 'lib/muwu/render_html_partial/render_title.rb', line 45
def write_tag_h1(key, value)
@destination.write_line tag_h1(key, value)
end
|