docgenerator 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/examples/creole_example_tabular.rb +95 -0
  2. data/examples/docgenerator_example.rb +5 -5
  3. data/lib/creole/creole2doc.rb +28 -18
  4. data/lib/creole/creole_inclusions.rb +4 -4
  5. data/lib/creole/creole_placeholder.rb +4 -1
  6. data/lib/creole/creole_tabular.rb +173 -155
  7. data/lib/creole/plugins/rail.rb +118 -119
  8. data/lib/creole/plugins/struktex.rb +35 -35
  9. data/lib/creole/plugins/todonotes.rb +8 -1
  10. data/lib/docgenerator/attribute.rb +160 -160
  11. data/lib/docgenerator/characters.rb +343 -311
  12. data/lib/docgenerator/css.rb +167 -167
  13. data/lib/docgenerator/document.rb +525 -511
  14. data/lib/docgenerator/element.rb +316 -316
  15. data/lib/docgenerator/element_meta.rb +114 -114
  16. data/lib/docgenerator/elements.rb +19 -9
  17. data/lib/docgenerator/environments.rb +3 -1
  18. data/lib/docgenerator/lists.rb +177 -174
  19. data/lib/docgenerator/packages/hyperref.rb +74 -70
  20. data/lib/docgenerator/packages/multicol.rb +33 -0
  21. data/lib/docgenerator/packages/scrlettr2.rb +152 -151
  22. data/lib/docgenerator/packages/todonotes.rb +1 -1
  23. data/lib/docgenerator/tabular.rb +463 -400
  24. data/lib/docgenerator/templates/docgenerator_template.rb +94 -84
  25. data/lib/docgenerator/templates/docgenerator_template.yaml +75 -15
  26. data/lib/docgenerator.rb +1 -1
  27. data/lib/wiki2doc/wiki2docgenerator.rb +1 -1
  28. data/meta_test_and_doc/build__meta.rb +125 -0
  29. data/meta_test_and_doc/build_doc.rb +333 -0
  30. data/meta_test_and_doc/build_test.rb +251 -0
  31. data/meta_test_and_doc/manpages/attachfile.rb +389 -0
  32. data/meta_test_and_doc/manpages/caption.rb +133 -0
  33. data/meta_test_and_doc/manpages/characters.rb +3738 -0
  34. data/meta_test_and_doc/manpages/elements.rb +6851 -0
  35. data/meta_test_and_doc/manpages/environments.rb +985 -0
  36. data/meta_test_and_doc/manpages/footnote.rb +439 -0
  37. data/meta_test_and_doc/manpages/hyperref.rb +605 -0
  38. data/meta_test_and_doc/manpages/listings.rb +988 -0
  39. data/meta_test_and_doc/manpages/lists.rb +1463 -0
  40. data/meta_test_and_doc/manpages/others.rb +129 -0
  41. data/meta_test_and_doc/manpages/packages.rb +13 -0
  42. data/meta_test_and_doc/manpages/pdfpages.rb +108 -0
  43. data/meta_test_and_doc/manpages/readme.rdoc +9 -0
  44. data/meta_test_and_doc/manpages/scrlettr2.rb +362 -0
  45. data/meta_test_and_doc/manpages/scrpage2.rb +2028 -0
  46. data/meta_test_and_doc/manpages/sectioning.rb +2467 -0
  47. data/meta_test_and_doc/manpages/tables.rb +2088 -0
  48. data/meta_test_and_doc/manpages/todonotes.rb +235 -0
  49. data/meta_test_and_doc/manpages/wiki2docgenerator.rb +64 -0
  50. data/{readme.rd → readme.rdoc} +18 -1
  51. data/unittest/expected/test_tabular.creole +33 -0
  52. data/unittest/expected_creole/test_creole_creole1.0test.html +3 -3
  53. data/unittest/expected_creole/test_creole_creole1.0test.latex +3 -3
  54. data/unittest/expected_creole/test_creole_creole1.0test.text +3 -3
  55. data/unittest/expected_creole/test_creole_inline_apostroph.html +6 -0
  56. data/unittest/expected_creole/test_creole_inline_apostroph.latex +8 -0
  57. data/unittest/expected_creole/test_creole_inline_apostroph.text +4 -0
  58. data/unittest/expected_creole/test_creole_input.normsource +12 -12
  59. data/unittest/expected_creole/test_creole_input.normsource_1.8 +23 -0
  60. data/unittest/expected_creole/test_creole_links_external_implicit.html +2 -2
  61. data/unittest/expected_creole/test_creole_links_external_implicit.latex +2 -2
  62. data/unittest/expected_creole/test_creole_links_external_implicit.text +2 -2
  63. data/unittest/expected_creole/test_creole_links_implicit_end.html +1 -1
  64. data/unittest/expected_creole/test_creole_links_implicit_end.latex +1 -1
  65. data/unittest/expected_creole/test_creole_list_ul.normsource +42 -42
  66. data/unittest/expected_creole/test_creole_list_ul.normsource_1.8 +83 -0
  67. data/unittest/expected_creole/test_creole_paragraphs.normsource +15 -15
  68. data/unittest/expected_creole/test_creole_paragraphs.normsource_1.8 +27 -0
  69. data/unittest/expected_creole/test_creole_tabular.creole +22 -0
  70. data/unittest/expected_creole/test_creole_tabular_creole.creole +19 -0
  71. data/unittest/expected_creole/test_creole_tabular_css.creole +24 -0
  72. data/unittest/expected_creole/test_creole_tabular_multicols.creole +16 -0
  73. data/unittest/expected_creole/test_creole_tabular_multicols.html +14 -0
  74. data/unittest/expected_creole/test_creole_tabular_multicols.latex +16 -0
  75. data/unittest/expected_creole/test_creole_tabular_with_cell_option.creole +21 -0
  76. data/unittest/expected_creole/test_creole_toc_level_text.html +2 -2
  77. data/unittest/expected_creole/test_creole_toc_level_text.latex +2 -2
  78. data/unittest/expected_packages/test_multicol_3.tex +2 -0
  79. data/unittest/expected_packages/test_multicol_3_titleline.tex +2 -0
  80. data/unittest/expected_templates/test_article.tex +23 -0
  81. data/unittest/expected_templates/test_article_utf8.tex +34 -0
  82. data/unittest/expected_templates/test_context.miv +18 -0
  83. data/unittest/expected_templates/test_creole.creole +8 -0
  84. data/unittest/expected_templates/test_html.html +12 -0
  85. data/unittest/expected_templates/test_html401_strict.html +14 -0
  86. data/unittest/expected_templates/test_html401_trans.html +14 -0
  87. data/unittest/expected_templates/test_html_utf8.html +14 -0
  88. data/unittest/expected_templates/test_include.tex +17 -0
  89. data/unittest/expected_templates/test_include_utf8.tex +17 -0
  90. data/unittest/expected_templates/test_text.txt +6 -0
  91. data/unittest/expected_templates/test_wiki.wiki +6 -0
  92. data/unittest/expected_templates/test_xhtml_strict.html +14 -0
  93. data/unittest/expected_templates/test_xhtml_trans.html +14 -0
  94. data/unittest/unittest_creole.rb +27 -6
  95. data/unittest/unittest_creole_placeholders.rb +1 -123
  96. data/unittest/unittest_creole_tabular.rb +174 -0
  97. data/unittest/unittest_docgenerator.rb +4 -3
  98. data/unittest/unittest_docgenerator_characters.rb +4769 -615
  99. data/unittest/unittest_packages_multicol.rb +84 -0
  100. data/unittest/unittest_rubycode4doc.rb +0 -1
  101. data/unittest/unittest_templates.rb +64 -0
  102. metadata +163 -77
  103. data/build_test_and_doc.rb +0 -505
  104. data/manpage_elements.rb +0 -10411
@@ -1,3 +1,4 @@
1
+ #encoding: utf-8
1
2
  =begin rdoc
2
3
  Define classes to use cascading style sheets (CSS) for HTML-documents.
3
4
  =end
@@ -14,150 +15,150 @@ Create an instance with
14
15
 
15
16
  Only for HTML.
16
17
  =end
17
- class Style < Element
18
- #~ add_attributes( HTML_ATTR_ALL )
19
- add_latex_output ''
20
- add_text_output ''
21
- add_wiki_output ''
22
- add_creole_output ''
23
- #Prepare HTML-Output for Style-Tag.
24
- #The values can be overwritten, if different CSS-Elements are inside.
25
- def to_html( options = {} )
26
- o = set_option_defaults(options)
27
- o[:log].debug("Enter style.to_html") if o[:log].debug?
28
- res = ""
29
- res << "\n" if @crbefore
30
- res << "<style type=\"text/css\">\n"
31
- @content.each{|c|
32
- res << c.to_html(options)
33
- }
34
- res << "</style>"
35
- res << "\n" if @crafter
36
- return res
37
- end
38
- end #Style
18
+ class Style < Element
19
+ #~ add_attributes( HTML_ATTR_ALL )
20
+ add_latex_output ''
21
+ add_text_output ''
22
+ add_wiki_output ''
23
+ add_creole_output ''
24
+ #Prepare HTML-Output for Style-Tag.
25
+ #The values can be overwritten, if different CSS-Elements are inside.
26
+ def to_html( options = {} )
27
+ o = set_option_defaults(options)
28
+ o[:log].debug("Enter style.to_html") if o[:log].debug?
29
+ res = ""
30
+ res << "\n" if @crbefore
31
+ res << "<style type=\"text/css\">\n"
32
+ @content.each{|c|
33
+ res << c.to_html(options)
34
+ }
35
+ res << "</style>"
36
+ res << "\n" if @crafter
37
+ return res
38
+ end
39
+ end #Style
39
40
 
40
- CSS_COLORS = [ /rgb\((\d+%?,?){3,3}\)/,
41
- #rgb(R,G,B), rgb(%,%,%) oder #XXXXXX
42
- #/gray\d{1,3}/
43
- 'black','gray', 'grey', 'maroon','red', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'purple', 'fuchsia', 'teal', 'aqua', 'silver', 'white',
44
- #Netscape-Farbnamen (120 zus�tzliche Farben)
45
- #Falsche Darstellungen, siehe http://www.rzuser.uni-heidelberg.de/~x22/ht/farben2.html
46
- 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgreen',
47
- 'lightgrey', 'lightgray', 'lightslategray', 'lightslategrey', #yes, both are defined
48
- 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightsteelblue', 'lightyellow',
49
- 'greenyellow', 'palegreen', 'darkgreen',
50
- 'darkred', 'firebrick',
51
- 'salmon',
52
- ]
53
- CSS_BORDER = [ 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset' ]
54
- CSS_WIDTH = [ /\d*(cm|mm|px|em|%)/, 'thin', 'medium', 'thick' ]
41
+ CSS_COLORS = [ /rgb\((\d+%?,?){3,3}\)/,
42
+ #rgb(R,G,B), rgb(%,%,%) oder #XXXXXX
43
+ #/gray\d{1,3}/
44
+ 'black','gray', 'grey', 'maroon','red', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'purple', 'fuchsia', 'teal', 'aqua', 'silver', 'white',
45
+ #Netscape-Farbnamen (120 additional colors)
46
+ #Falsche Darstellungen, siehe http://www.rzuser.uni-heidelberg.de/~x22/ht/farben2.html
47
+ 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgreen',
48
+ 'lightgrey', 'lightgray', 'lightslategray', 'lightslategrey', #yes, both are defined
49
+ 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightsteelblue', 'lightyellow',
50
+ 'greenyellow', 'palegreen', 'darkgreen',
51
+ 'darkred', 'firebrick',
52
+ 'salmon',
53
+ ]
54
+ CSS_BORDER = [ 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset' ]
55
+ CSS_WIDTH = [ /\d*(cm|mm|px|em|%)/, 'thin', 'medium', 'thick' ]
55
56
 
56
57
  =begin rdoc
57
58
  Class to collect css-settings for a Element.
58
59
 
59
60
  This values can be used inline (style-Attribute) and inside style>-Tags
60
61
  =end
61
- class CSS
62
- #List of all allowed values.
63
- #The first value is a regular expression, coninued by fixed values.
64
- @@values = {
65
- 'font-size' => [ 'xx-small', 'x-small', 'small', 'medium', 'large','x-large','xx-large','smaller','larger', /\A\d+(pt|px|em)/ ],
66
- 'font-style' => ['italic', 'oblique', 'normal'],
67
- 'font-weight' => ['bold', 'bolder', 'lighter', 'normal', /\A\d00\Z/ ],
68
- 'color' => CSS_COLORS,
69
- 'background-color' => CSS_COLORS,
70
- 'visibility' => ['hidden', 'visible' ],
71
- 'text-decoration' => ['underline', 'overline', 'line-through', 'blink', 'none'],
72
- #Ausrichtung
73
- 'float' => ['left', 'right', 'none' ],
74
- 'display' => ['inline'],
75
- 'text-align' => ['left', 'center', 'right', 'justify', 'char'],
76
- 'vertical-align' => ['top', 'middle','bottom','baseline','sub','super','text-top','text-bottom'],
77
- 'clear' => ['left', 'right','both','none'], #Fortsetzung bei Textumfluss
78
- 'white-space' => [ 'normal', 'pre', 'nowrap' ], #Textumbruch innererhalb des tags
79
- #Borders: CSS-Eigenschaften: Au�enrand/Abstand
80
- 'margin' => CSS_WIDTH,
81
- 'margin-top' => CSS_WIDTH,
82
- 'margin-bottom' => CSS_WIDTH,
83
- 'margin-left' => CSS_WIDTH,
84
- 'margin-right' => CSS_WIDTH,
85
- #Borders: CSS-Eigenschaften: Innenabstand
86
- 'padding' => CSS_WIDTH,
87
- 'padding-top' => CSS_WIDTH,
88
- 'padding-bottom' => CSS_WIDTH,
89
- 'padding-left' => CSS_WIDTH,
90
- 'padding-right' => CSS_WIDTH,
91
- #Tabulars
92
- 'border-style' => CSS_BORDER,
93
- 'border-left-style' => CSS_BORDER,
94
- 'border-right-style' => CSS_BORDER,
95
- 'border-top-style' => CSS_BORDER,
96
- 'border-bottom-style' => CSS_BORDER,
97
- 'border-width' => CSS_WIDTH,
98
- 'border-left-width' => CSS_WIDTH,
99
- 'border-right-width' => CSS_WIDTH,
100
- 'border-top-width' => CSS_WIDTH,
101
- 'border-bottom-width' => CSS_WIDTH,
102
- 'border-color' => CSS_COLORS,
103
- 'border-left-color' => CSS_COLORS,
104
- 'border-right-color' => CSS_COLORS,
105
- 'border-top-color' => CSS_COLORS,
106
- 'border-bottom-color' => CSS_COLORS,
107
- 'table-layout' => ['auto', 'fixed'], #Not in Opera
108
- 'empty-cells' => ['show', 'hide'],
109
- 'border-collapse' => ['separate', 'collapse'],
110
- #Positionierung und Anzeige von Elementen
111
- 'position' => ['absolute', 'fixed', 'relative', 'static'],
112
- 'top' => CSS_WIDTH,
113
- 'left' => CSS_WIDTH,
114
- 'bottom' => CSS_WIDTH,
115
- 'right' => CSS_WIDTH,
116
- 'width' => CSS_WIDTH,
117
- 'min-width' => CSS_WIDTH,
118
- 'max-width' => CSS_WIDTH,
119
- 'height' => CSS_WIDTH,
120
- 'min-height' => CSS_WIDTH,
121
- 'max-height' => CSS_WIDTH,
122
- 'overflow' => ['visible', 'hidden', 'scroll', 'auto' ],
123
- #Lists
124
- 'list-style-type' => [
125
- 'decimal', 'lower-roman', 'upper-roman', 'lower-alpha', 'upper-alpha', 'lower-greek', 'hebrew', 'decimal-leading-zero',
126
- 'cjk-ideographic', 'hiragana', 'katakana', 'hiragana-iroha', 'katakana-iroha', #Japanese
127
- 'disc', 'circle', 'square', #ul
128
- 'none'],
129
- 'list-style-position' => [ 'inside', 'outside'],
130
- 'list-style-image' => String, #URI
131
- #~ 'list-style' => @@values['list-style-type'] + @@values['list-style-position'],
132
- #Generell settings
133
- #~ ['bottom', 'top', 'middle', 'baseline'],
134
- }
135
- def initialize( values ={} )
136
- @values = {}
137
- #~ set_option_defaults(values) #guarantee :log
138
- @log = values[:log] || DOCGENERATOR_DEFAULT_LOGGER
139
- values.delete(:log)
140
-
141
- values.each{|k,v|
142
- self[k] = v
143
- }
144
- @cr = nil
145
- end
62
+ class CSS
63
+ #List of all allowed values.
64
+ #The first value is a regular expression, coninued by fixed values.
65
+ @@values = {
66
+ 'font-size' => [ 'xx-small', 'x-small', 'small', 'medium', 'large','x-large','xx-large','smaller','larger', /\A\d+(pt|px|em)/ ],
67
+ 'font-style' => ['italic', 'oblique', 'normal'],
68
+ 'font-weight' => ['bold', 'bolder', 'lighter', 'normal', /\A\d00\Z/ ],
69
+ 'color' => CSS_COLORS,
70
+ 'background-color' => CSS_COLORS,
71
+ 'visibility' => ['hidden', 'visible' ],
72
+ 'text-decoration' => ['underline', 'overline', 'line-through', 'blink', 'none'],
73
+ #Ausrichtung
74
+ 'float' => ['left', 'right', 'none' ],
75
+ 'display' => ['inline'],
76
+ 'text-align' => ['left', 'center', 'right', 'justify', 'char'],
77
+ 'vertical-align' => ['top', 'middle','bottom','baseline','sub','super','text-top','text-bottom'],
78
+ 'clear' => ['left', 'right','both','none'], #Fortsetzung bei Textumfluss
79
+ 'white-space' => [ 'normal', 'pre', 'nowrap' ], #Textumbruch innererhalb des tags
80
+ #Borders: CSS-Eigenschaften: Außenrand/Abstand
81
+ 'margin' => CSS_WIDTH,
82
+ 'margin-top' => CSS_WIDTH,
83
+ 'margin-bottom' => CSS_WIDTH,
84
+ 'margin-left' => CSS_WIDTH,
85
+ 'margin-right' => CSS_WIDTH,
86
+ #Borders: CSS-Eigenschaften: Innenabstand
87
+ 'padding' => CSS_WIDTH,
88
+ 'padding-top' => CSS_WIDTH,
89
+ 'padding-bottom' => CSS_WIDTH,
90
+ 'padding-left' => CSS_WIDTH,
91
+ 'padding-right' => CSS_WIDTH,
92
+ #Tabulars
93
+ 'border-style' => CSS_BORDER,
94
+ 'border-left-style' => CSS_BORDER,
95
+ 'border-right-style' => CSS_BORDER,
96
+ 'border-top-style' => CSS_BORDER,
97
+ 'border-bottom-style' => CSS_BORDER,
98
+ 'border-width' => CSS_WIDTH,
99
+ 'border-left-width' => CSS_WIDTH,
100
+ 'border-right-width' => CSS_WIDTH,
101
+ 'border-top-width' => CSS_WIDTH,
102
+ 'border-bottom-width' => CSS_WIDTH,
103
+ 'border-color' => CSS_COLORS,
104
+ 'border-left-color' => CSS_COLORS,
105
+ 'border-right-color' => CSS_COLORS,
106
+ 'border-top-color' => CSS_COLORS,
107
+ 'border-bottom-color' => CSS_COLORS,
108
+ 'table-layout' => ['auto', 'fixed'], #Not in Opera
109
+ 'empty-cells' => ['show', 'hide'],
110
+ 'border-collapse' => ['separate', 'collapse'],
111
+ #Positionierung und Anzeige von Elementen
112
+ 'position' => ['absolute', 'fixed', 'relative', 'static'],
113
+ 'top' => CSS_WIDTH,
114
+ 'left' => CSS_WIDTH,
115
+ 'bottom' => CSS_WIDTH,
116
+ 'right' => CSS_WIDTH,
117
+ 'width' => CSS_WIDTH,
118
+ 'min-width' => CSS_WIDTH,
119
+ 'max-width' => CSS_WIDTH,
120
+ 'height' => CSS_WIDTH,
121
+ 'min-height' => CSS_WIDTH,
122
+ 'max-height' => CSS_WIDTH,
123
+ 'overflow' => ['visible', 'hidden', 'scroll', 'auto' ],
124
+ #Lists
125
+ 'list-style-type' => [
126
+ 'decimal', 'lower-roman', 'upper-roman', 'lower-alpha', 'upper-alpha', 'lower-greek', 'hebrew', 'decimal-leading-zero',
127
+ 'cjk-ideographic', 'hiragana', 'katakana', 'hiragana-iroha', 'katakana-iroha', #Japanese
128
+ 'disc', 'circle', 'square', #ul
129
+ 'none'],
130
+ 'list-style-position' => [ 'inside', 'outside'],
131
+ 'list-style-image' => String, #URI
132
+ #~ 'list-style' => @@values['list-style-type'] + @@values['list-style-position'],
133
+ #Generell settings
134
+ #~ ['bottom', 'top', 'middle', 'baseline'],
135
+ }
136
+ def initialize( values ={} )
137
+ @values = {}
138
+ #~ set_option_defaults(values) #guarantee :log
139
+ @log = values[:log] || DOCGENERATOR_DEFAULT_LOGGER
140
+ values.delete(:log)
141
+
142
+ values.each{|k,v|
143
+ self[k] = v
144
+ }
145
+ @cr = nil
146
+ end
146
147
  =begin rdoc
147
148
  Make key unique. convert symbol to String...
148
149
  =end
149
- def generalize_key( k )
150
- key = nil
151
- if k.is_a?(Symbol)
152
- key = k.to_s.gsub('_','-')
153
- else
154
- key = k
155
- end
156
- return key
157
- end
158
- def []( k )
159
- return @values[generalize_key( k )]
160
- end
150
+ def generalize_key( k )
151
+ key = nil
152
+ if k.is_a?(Symbol)
153
+ key = k.to_s.gsub('_','-')
154
+ else
155
+ key = k
156
+ end
157
+ return key
158
+ end
159
+ def []( k )
160
+ return @values[generalize_key( k )]
161
+ end
161
162
  =begin rdoc
162
163
  Add a setting.
163
164
 
@@ -165,45 +166,44 @@ If an existing value is overwritten, you get a warning.
165
166
  To replace a value, use
166
167
  css[key].replace( value ) (But the you have no check)
167
168
  =end
168
- def []=( k, v )
169
- key = generalize_key( k )
170
- if @values[key]
171
- @log.warn("CSS: Overwrite #{k.inspect}") if @log.warn?
172
- end
173
- if ! @@values[key]
174
- @log.error("CSS: Undefined key #{k.inspect}") if @log.error?
175
- elsif @@values[key].include?(v) #Fine
176
- elsif @@values[key][0].is_a?(Regexp) and @@values[key][0] =~ v.to_s
177
- else
178
- @log.error("CSS: #{v} not allowed for #{key}") if @log.error?
179
- end
180
-
181
- @values[key] = v
182
- end
169
+ def []=( k, v )
170
+ key = generalize_key( k )
171
+ if @values[key]
172
+ @log.warn("CSS: Overwrite #{k.inspect}") if @log.warn?
173
+ end
174
+ if ! @@values[key]
175
+ @log.error("CSS: Undefined key #{k.inspect}") if @log.error?
176
+ elsif @@values[key].include?(v) #Fine
177
+ elsif @@values[key][0].is_a?(Regexp) and @@values[key][0] =~ v.to_s
178
+ else
179
+ @log.error("CSS: #{v} not allowed for #{key}") if @log.error?
180
+ end
181
+
182
+ @values[key] = v
183
+ end
183
184
  =begin rdoc
184
185
  Returns the values for a direct css in the style-attribute for a HTML-tag.
185
186
  =end
186
- def to_html(options={})
187
- o = {
188
- :map => "%s;",
189
- }.update(options)
190
- return self.to_tab.map{|p| o[:map] % p}.join()
191
- end
192
- def to_s()
193
- return self.to_html
194
- end
187
+ def to_html(options={})
188
+ o = {
189
+ :map => "%s;",
190
+ }.update(options)
191
+ return self.to_tab.map{|p| o[:map] % p}.join()
192
+ end
193
+ def to_s()
194
+ return self.to_html
195
+ end
195
196
  =begin rdoc
196
197
  Returns a tab with the textes for each characteristic.
197
198
  =end
198
- def to_tab()
199
- s = []
200
- @values.sort.each{|k,v|
201
- s << "#{k}: #{v}"
202
- }
203
- return s
204
- end
205
- end #CSS
206
-
199
+ def to_tab()
200
+ s = []
201
+ @values.sort.each{|k,v|
202
+ s << "#{k}: #{v}"
203
+ }
204
+ return s
205
+ end
206
+ end #CSS
207
207
  end #module Docgenerator
208
208
 
209
209
  if __FILE__ == $0