Class: Muwu::RenderHtmlPartial::Metadata
- Inherits:
-
Object
- Object
- Muwu::RenderHtmlPartial::Metadata
show all
- Includes:
- Muwu
- Defined in:
- lib/muwu/render_html_partial/render_metadata.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_metadata.rb', line 9
def destination
@destination
end
|
Returns the value of attribute metadata.
9
10
11
|
# File 'lib/muwu/render_html_partial/render_metadata.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_metadata.rb', line 15
def render
@destination.margin_to_zero
@destination.padding_vertical(1) do
write_tag_div_open
render_dl
write_tag_div_close
end
@destination.margin_to_zero
end
|
#render_dl ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 26
def render_dl
@destination.margin_indent do
write_tag_dl_open
render_dl_metadata_div
write_tag_dl_close
end
end
|
35
36
37
38
39
40
41
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 35
def render_dl_metadata_div
@destination.margin_indent do
@metadata.each_pair do |key, value|
write_tag_div_metadata(key, value)
end
end
end
|
#write_tag_div_close ⇒ Object
44
45
46
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 44
def write_tag_div_close
@destination.write_line tag_div_close
end
|
64
65
66
67
68
69
70
71
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 64
def write_tag_div_metadata(key, value)
@destination.write_line tag_dl_div_open
@destination.margin_indent do
@destination.write_line tag_dt_key(key)
@destination.write_line tag_dd_value(value)
end
@destination.write_line tag_dl_div_close
end
|
#write_tag_div_open ⇒ Object
49
50
51
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 49
def write_tag_div_open
@destination.write_line tag_div_open
end
|
#write_tag_dl_close ⇒ Object
54
55
56
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 54
def write_tag_dl_close
@destination.write_line tag_dl_close
end
|
#write_tag_dl_open ⇒ Object
59
60
61
|
# File 'lib/muwu/render_html_partial/render_metadata.rb', line 59
def write_tag_dl_open
@destination.write_line tag_dl_open
end
|