zucker 2 → 3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. data/CHANGELOG +12 -0
  2. data/README +4 -1
  3. data/Rakefile +17 -7
  4. data/lib/zucker.rb +7 -1
  5. data/lib/zucker/2/all.rb +2 -2
  6. data/lib/zucker/2/debug.rb +3 -3
  7. data/lib/zucker/2/default.rb +1 -1
  8. data/lib/zucker/3/D.rb +19 -0
  9. data/lib/zucker/3/alias_for.rb +19 -0
  10. data/lib/zucker/3/aliases.rb +28 -0
  11. data/lib/zucker/3/all.rb +6 -0
  12. data/lib/zucker/3/array.rb +23 -0
  13. data/lib/zucker/3/array2proc.rb +16 -0
  14. data/lib/zucker/3/binding.rb +25 -0
  15. data/lib/zucker/3/blank.rb +26 -0
  16. data/lib/zucker/3/class2proc.rb +10 -0
  17. data/lib/zucker/3/debug.rb +6 -0
  18. data/lib/zucker/3/default.rb +35 -0
  19. data/lib/zucker/3/egonil.rb +14 -0
  20. data/lib/zucker/3/enumerable.rb +12 -0
  21. data/lib/zucker/3/hash.rb +19 -0
  22. data/lib/zucker/3/hash2proc.rb +14 -0
  23. data/lib/zucker/3/info.rb +167 -0
  24. data/lib/zucker/3/iterate.rb +23 -0
  25. data/lib/zucker/3/ivars.rb +26 -0
  26. data/lib/zucker/3/kernel.rb +48 -0
  27. data/lib/zucker/3/mcopy.rb +8 -0
  28. data/lib/zucker/3/mm.rb +31 -0
  29. data/lib/zucker/3/not.rb +17 -0
  30. data/lib/zucker/3/regexp2proc.rb +10 -0
  31. data/lib/zucker/3/sandbox.rb +19 -0
  32. data/lib/zucker/3/square_brackets_for.rb +20 -0
  33. data/lib/zucker/3/string.rb +47 -0
  34. data/lib/zucker/3/tap.rb +9 -0
  35. data/lib/zucker/3/unary.rb +22 -0
  36. data/lib/zucker/3/union.rb +14 -0
  37. data/lib/zucker/alias_for.rb +19 -0
  38. data/lib/zucker/array.rb +8 -2
  39. data/lib/zucker/debug.rb +2 -0
  40. data/lib/zucker/default.rb +11 -1
  41. data/lib/zucker/info.rb +5 -2
  42. data/lib/zucker/kernel.rb +41 -11
  43. data/lib/zucker/mcopy.rb +0 -1
  44. data/lib/zucker/not.rb +17 -0
  45. data/lib/zucker/string.rb +24 -2
  46. data/lib/zucker/tap.rb +9 -0
  47. metadata +41 -160
  48. data/lib/zucker/1/desc/D.yaml +0 -23
  49. data/lib/zucker/1/desc/aliases.yaml +0 -16
  50. data/lib/zucker/1/desc/array.yaml +0 -14
  51. data/lib/zucker/1/desc/array2proc.yaml +0 -13
  52. data/lib/zucker/1/desc/binding.yaml +0 -10
  53. data/lib/zucker/1/desc/blank.yaml +0 -12
  54. data/lib/zucker/1/desc/class2proc.yaml +0 -12
  55. data/lib/zucker/1/desc/egonil.yaml +0 -17
  56. data/lib/zucker/1/desc/enumerable.yaml +0 -11
  57. data/lib/zucker/1/desc/hash.yaml +0 -12
  58. data/lib/zucker/1/desc/hash2proc.yaml +0 -11
  59. data/lib/zucker/1/desc/iterate.yaml +0 -17
  60. data/lib/zucker/1/desc/ivars.yaml +0 -20
  61. data/lib/zucker/1/desc/kernel.yaml +0 -13
  62. data/lib/zucker/1/desc/mcopy.yaml +0 -12
  63. data/lib/zucker/1/desc/mm.yaml +0 -12
  64. data/lib/zucker/1/desc/regexp2proc.yaml +0 -13
  65. data/lib/zucker/1/desc/sandbox.yaml +0 -14
  66. data/lib/zucker/1/desc/square_brackets_for.yaml +0 -23
  67. data/lib/zucker/1/desc/string.yaml +0 -13
  68. data/lib/zucker/1/desc/unary.yaml +0 -15
  69. data/lib/zucker/1/desc/union.yaml +0 -11
  70. data/lib/zucker/1/doc/meta.yaml +0 -4
  71. data/lib/zucker/1/doc/zucker_doc.html +0 -1286
  72. data/lib/zucker/1/doc/zucker_doc.rb +0 -493
  73. data/lib/zucker/1/spec/D_spec.rb +0 -27
  74. data/lib/zucker/1/spec/aliases_spec.rb +0 -34
  75. data/lib/zucker/1/spec/array2proc_spec.rb +0 -8
  76. data/lib/zucker/1/spec/array_spec.rb +0 -23
  77. data/lib/zucker/1/spec/binding_spec.rb +0 -6
  78. data/lib/zucker/1/spec/blank_spec.rb +0 -20
  79. data/lib/zucker/1/spec/class2proc_spec.rb +0 -9
  80. data/lib/zucker/1/spec/egonil_spec.rb +0 -30
  81. data/lib/zucker/1/spec/enumerable_spec.rb +0 -8
  82. data/lib/zucker/1/spec/hash2proc_spec.rb +0 -12
  83. data/lib/zucker/1/spec/hash_spec.rb +0 -10
  84. data/lib/zucker/1/spec/iterate_spec.rb +0 -54
  85. data/lib/zucker/1/spec/ivars_spec.rb +0 -20
  86. data/lib/zucker/1/spec/kernel_spec.rb +0 -34
  87. data/lib/zucker/1/spec/mcopy_spec.rb +0 -13
  88. data/lib/zucker/1/spec/mm_spec.rb +0 -6
  89. data/lib/zucker/1/spec/regexp2proc_spec.rb +0 -9
  90. data/lib/zucker/1/spec/sandbox_spec.rb +0 -7
  91. data/lib/zucker/1/spec/square_brackets_for_spec.rb +0 -59
  92. data/lib/zucker/1/spec/string_spec.rb +0 -29
  93. data/lib/zucker/1/spec/unary_spec.rb +0 -26
  94. data/lib/zucker/1/spec/union_spec.rb +0 -13
  95. data/lib/zucker/2/desc/D.yaml +0 -23
  96. data/lib/zucker/2/desc/aliases.yaml +0 -16
  97. data/lib/zucker/2/desc/array.yaml +0 -14
  98. data/lib/zucker/2/desc/array2proc.yaml +0 -17
  99. data/lib/zucker/2/desc/binding.yaml +0 -10
  100. data/lib/zucker/2/desc/blank.yaml +0 -10
  101. data/lib/zucker/2/desc/class2proc.yaml +0 -12
  102. data/lib/zucker/2/desc/egonil.yaml +0 -17
  103. data/lib/zucker/2/desc/enumerable.yaml +0 -11
  104. data/lib/zucker/2/desc/hash.yaml +0 -14
  105. data/lib/zucker/2/desc/hash2proc.yaml +0 -11
  106. data/lib/zucker/2/desc/info.yaml +0 -12
  107. data/lib/zucker/2/desc/iterate.yaml +0 -17
  108. data/lib/zucker/2/desc/ivars.yaml +0 -20
  109. data/lib/zucker/2/desc/kernel.yaml +0 -13
  110. data/lib/zucker/2/desc/mcopy.yaml +0 -12
  111. data/lib/zucker/2/desc/mm.yaml +0 -12
  112. data/lib/zucker/2/desc/regexp2proc.yaml +0 -13
  113. data/lib/zucker/2/desc/sandbox.yaml +0 -19
  114. data/lib/zucker/2/desc/square_brackets_for.yaml +0 -23
  115. data/lib/zucker/2/desc/string.yaml +0 -13
  116. data/lib/zucker/2/desc/unary.yaml +0 -15
  117. data/lib/zucker/2/desc/union.yaml +0 -11
  118. data/lib/zucker/2/doc/zucker_doc.html +0 -1494
  119. data/lib/zucker/2/doc/zucker_doc.rb +0 -498
  120. data/lib/zucker/2/spec/D_spec.rb +0 -35
  121. data/lib/zucker/2/spec/aliases_spec.rb +0 -13
  122. data/lib/zucker/2/spec/array2proc_spec.rb +0 -12
  123. data/lib/zucker/2/spec/array_spec.rb +0 -23
  124. data/lib/zucker/2/spec/binding_spec.rb +0 -8
  125. data/lib/zucker/2/spec/blank_spec.rb +0 -20
  126. data/lib/zucker/2/spec/class2proc_spec.rb +0 -9
  127. data/lib/zucker/2/spec/egonil_spec.rb +0 -30
  128. data/lib/zucker/2/spec/enumerable_spec.rb +0 -8
  129. data/lib/zucker/2/spec/hash2proc_spec.rb +0 -12
  130. data/lib/zucker/2/spec/hash_spec.rb +0 -17
  131. data/lib/zucker/2/spec/info_spec.rb +0 -8
  132. data/lib/zucker/2/spec/iterate_spec.rb +0 -54
  133. data/lib/zucker/2/spec/ivars_spec.rb +0 -20
  134. data/lib/zucker/2/spec/kernel_spec.rb +0 -28
  135. data/lib/zucker/2/spec/mcopy_spec.rb +0 -13
  136. data/lib/zucker/2/spec/mm_spec.rb +0 -8
  137. data/lib/zucker/2/spec/regexp2proc_spec.rb +0 -9
  138. data/lib/zucker/2/spec/sandbox_spec.rb +0 -26
  139. data/lib/zucker/2/spec/spec_helper.rb +0 -18
  140. data/lib/zucker/2/spec/square_brackets_for_spec.rb +0 -59
  141. data/lib/zucker/2/spec/string_spec.rb +0 -29
  142. data/lib/zucker/2/spec/unary_spec.rb +0 -26
  143. data/lib/zucker/2/spec/union_spec.rb +0 -15
  144. data/lib/zucker/desc/D.yaml +0 -23
  145. data/lib/zucker/desc/aliases.yaml +0 -16
  146. data/lib/zucker/desc/array.yaml +0 -14
  147. data/lib/zucker/desc/array2proc.yaml +0 -17
  148. data/lib/zucker/desc/binding.yaml +0 -10
  149. data/lib/zucker/desc/blank.yaml +0 -10
  150. data/lib/zucker/desc/class2proc.yaml +0 -12
  151. data/lib/zucker/desc/egonil.yaml +0 -17
  152. data/lib/zucker/desc/enumerable.yaml +0 -11
  153. data/lib/zucker/desc/hash.yaml +0 -14
  154. data/lib/zucker/desc/hash2proc.yaml +0 -11
  155. data/lib/zucker/desc/info.yaml +0 -12
  156. data/lib/zucker/desc/iterate.yaml +0 -17
  157. data/lib/zucker/desc/ivars.yaml +0 -20
  158. data/lib/zucker/desc/kernel.yaml +0 -13
  159. data/lib/zucker/desc/mcopy.yaml +0 -12
  160. data/lib/zucker/desc/mm.yaml +0 -12
  161. data/lib/zucker/desc/regexp2proc.yaml +0 -13
  162. data/lib/zucker/desc/sandbox.yaml +0 -19
  163. data/lib/zucker/desc/square_brackets_for.yaml +0 -23
  164. data/lib/zucker/desc/string.yaml +0 -13
  165. data/lib/zucker/desc/unary.yaml +0 -15
  166. data/lib/zucker/desc/union.yaml +0 -11
  167. data/lib/zucker/doc/zucker_doc.html +0 -1494
  168. data/lib/zucker/doc/zucker_doc.rb +0 -498
  169. data/lib/zucker/edge/ideas/args.rb +0 -22
  170. data/lib/zucker/edge/ideas/args.yaml +0 -19
  171. data/lib/zucker/edge/ideas/args_spec.rb +0 -19
  172. data/lib/zucker/edge/ideas/clone_deep.rb +0 -21
  173. data/lib/zucker/edge/ideas/clone_deep_spec.rb +0 -12
  174. data/lib/zucker/edge/ideas/dclone.yaml +0 -12
  175. data/lib/zucker/edge/ideas/hash.rb +0 -18
  176. data/lib/zucker/edge/ideas/require_directory.rb +0 -6
  177. data/lib/zucker/spec/D_spec.rb +0 -35
  178. data/lib/zucker/spec/aliases_spec.rb +0 -13
  179. data/lib/zucker/spec/array2proc_spec.rb +0 -12
  180. data/lib/zucker/spec/array_spec.rb +0 -23
  181. data/lib/zucker/spec/binding_spec.rb +0 -8
  182. data/lib/zucker/spec/blank_spec.rb +0 -20
  183. data/lib/zucker/spec/class2proc_spec.rb +0 -9
  184. data/lib/zucker/spec/egonil_spec.rb +0 -30
  185. data/lib/zucker/spec/enumerable_spec.rb +0 -8
  186. data/lib/zucker/spec/hash2proc_spec.rb +0 -12
  187. data/lib/zucker/spec/hash_spec.rb +0 -17
  188. data/lib/zucker/spec/info_spec.rb +0 -8
  189. data/lib/zucker/spec/iterate_spec.rb +0 -54
  190. data/lib/zucker/spec/ivars_spec.rb +0 -20
  191. data/lib/zucker/spec/kernel_spec.rb +0 -28
  192. data/lib/zucker/spec/mcopy_spec.rb +0 -13
  193. data/lib/zucker/spec/mm_spec.rb +0 -8
  194. data/lib/zucker/spec/regexp2proc_spec.rb +0 -9
  195. data/lib/zucker/spec/sandbox_spec.rb +0 -26
  196. data/lib/zucker/spec/spec_helper.rb +0 -18
  197. data/lib/zucker/spec/square_brackets_for_spec.rb +0 -59
  198. data/lib/zucker/spec/string_spec.rb +0 -29
  199. data/lib/zucker/spec/unary_spec.rb +0 -26
  200. data/lib/zucker/spec/union_spec.rb +0 -15
@@ -1,493 +0,0 @@
1
- # Ruby 1.9, encoding: utf-8
2
- require 'yaml'
3
- require 'coderay'
4
-
5
- class ZuckerDoc
6
- DESCRIPTIONS = {
7
- 'summary' => 'Summary',
8
- 'why' => 'Why?',
9
- 'methods' => 'Methods/Usage',
10
- 'info' => 'Further information',
11
- 'spec' => 'Specification',
12
- 'source' => 'Source',
13
- 'versions' => 'Compatibility',
14
- 'authors' => 'Authors',
15
- }
16
- ORDER = %w|summary why methods info spec source versions|
17
-
18
- # template vars
19
- @version = 1
20
-
21
- class << self
22
- def generate
23
-
24
- cubes = Dir['../desc/*'].inject({}) do |res, cube_file; a|
25
- a = YAML.load_file cube_file
26
- if a.instance_of? Hash
27
- res.merge a
28
- else
29
- res
30
- end
31
- end
32
-
33
- @meta = YAML.load_file 'meta.yaml'
34
-
35
- output = 'zucker_doc.html'
36
- result = DATA.read
37
-
38
- cubes_html = cubes.sort.map{ |name, hash|
39
- cube name, hash
40
- }.join
41
-
42
- # insert cubes
43
- result.sub! '....', cubes_html
44
- # substitute vars
45
- result.gsub! /\.\.([a-z]+)\.\./i do eval "@#$1" end
46
- # code needs to be codish ;)
47
- result.gsub! /⇧(.+?)⇧/, '<code>\1</code>'
48
- # strong
49
- result.gsub! /●(.+?)●/, '<strong>\1</strong>'
50
- # hyper!links
51
- result.gsub! /→(.+?)→(.+?)→/, '<a href="\2">\1</a>'
52
-
53
- File.open output, 'w' do |file|
54
- file.puts result
55
- end
56
- end
57
-
58
- protected
59
-
60
- def cube(name, hash)
61
- @cube_name = name
62
- %{ <h3 title="require 'zucker/#{name}'">#{ name }</h3>
63
- <table class="cube_table"
64
- id="#{ name }_cube"
65
- title="require 'zucker/#{name}'"> } +
66
-
67
- ORDER.map{ |th|
68
- if th == 'spec' ||
69
- th == 'source' ||
70
- td = hash[th]
71
-
72
- "<tr><th>#{ DESCRIPTIONS[th] }</th>" +
73
- " <td>#{ send th, td }</td></tr>"
74
- end
75
- }.join +
76
- '</table>'
77
- end
78
-
79
- def methods(m)
80
- m.map{ |name, usage|
81
- "<h5>#{name}</h5>" +
82
- "<pre class=\"usage source\" style=\"display:block\">#{ syntax_highlight usage }</pre>"
83
- }.join
84
- end
85
-
86
- def info(i)
87
- convert_html_chars i.join '<br/>'
88
- end
89
-
90
- def authors(a)
91
- a.map{ |author|
92
- author +
93
- ( (tmp = @meta[author]) ? " | #{ tmp }" : '' )
94
- }.join '<br/>'
95
- end
96
-
97
- def why(w)
98
- if w.is_a? Array
99
- w = w.map{|e| "<p>#{e}</p>"}.join
100
- end
101
- convert_html_chars w
102
- end
103
-
104
- def summary(s)
105
- convert_html_chars s
106
- end
107
-
108
- def versions(v)
109
- v.join ', '
110
- end
111
-
112
- def spec(s)
113
- source_helper(:spec, '../spec/', '_spec')
114
- end
115
-
116
- def source(s)
117
- source_helper(:source, '../')
118
- end
119
-
120
- def source_helper(kind, file_prefix, suffix='')
121
- %{ <span id="show_#{@cube_name}_#{kind}">(<a href="javascript:show('#{@cube_name}_#{kind}')">show</a>)</span>
122
- <pre class="source" id="#{@cube_name}_#{kind}">#{
123
- get_source_file( file_prefix + @cube_name + suffix + '.rb' )
124
- }</pre> }
125
- end
126
-
127
- def get_source_file(filename)
128
- if File.file? filename
129
- syntax_highlight( File.read(filename).strip )
130
- else
131
- '<em>FIXME: missing</em>'
132
- end
133
- end
134
-
135
- def syntax_highlight(string)
136
- #convert_html_chars
137
- CodeRay.scan(string, :ruby).html
138
- end
139
-
140
- def convert_html_chars(string, protect_spaces = false)
141
- string = string.to_s.gsub( "\n", '<br/>' )
142
-
143
- if protect_spaces
144
- string.gsub(' ',' ')
145
- else
146
- string
147
- end
148
- end
149
- end
150
- end
151
-
152
- ZuckerDoc.generate
153
-
154
- __END__
155
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
156
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
157
-
158
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
159
- <head>
160
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
161
-
162
- <title>Ruby Zucker ..version..</title>
163
- <script type="text/javascript">
164
- var show = function(snippet){
165
- document.getElementById( snippet ).style.display = 'block'
166
- if( document.getElementById( 'show_'+snippet ) ){
167
- document.getElementById( 'show_'+snippet ).style.display = 'none'
168
- }
169
- }
170
- </script>
171
- <style type="text/css">
172
- body{
173
- background-color:#aaa;
174
- color:#111;
175
- font-family:sans-serif;
176
- }
177
-
178
- #world{
179
- background:#fff;
180
- }
181
-
182
- h1, h2, h3, h4, h5, h6{
183
- margin:0px;
184
- padding:0px;
185
- }
186
-
187
- h1{
188
- color:#222;
189
- text-align:center;
190
- padding:0.5em;
191
- }
192
- h2{
193
- margin-left:0.5em;
194
- margin-top:0.8em;
195
- margin-bottom:0.5em;
196
- }
197
-
198
- th{
199
- width:200px;
200
- color:#444;
201
- }
202
-
203
- p{
204
- margin:0px;
205
- margin-bottom:0.5em;
206
- }
207
-
208
- p.text{
209
- margin-left:1.5em;
210
- margin-right:1em;
211
- }
212
-
213
- code{
214
- }
215
-
216
- .scode{
217
- display:block;
218
- margin:0.8em;
219
- # margin-right:1.8em;
220
- padding:0.5em;
221
- border:1px solid black;
222
- background:#eee;
223
- }
224
-
225
- #.cube_table{
226
- # display:none;
227
- #}
228
- .cubes{
229
- margin:0px;
230
- margin-left:1.5em;
231
- margin-right:1em;
232
- }
233
-
234
- a{
235
- color:#111;
236
- }
237
-
238
- table{
239
- margin:0.8em;
240
- margin-top:0.2em;
241
- padding:0.2em;
242
- border:1px solid #111;
243
- background:#eee;
244
- overflow:auto;
245
- display:block;
246
- }
247
-
248
- th{
249
- text-align:left;
250
- vertical-align:top;
251
- padding-right:3em;
252
- }
253
-
254
- td{
255
- width:100%;
256
- }
257
-
258
- li{
259
- list-style:none;
260
- }
261
-
262
-
263
- #foot{
264
- text-align:left;
265
- padding:0.3em;
266
- font-size:70%
267
- }
268
- #foot, #foot a{
269
- color:#444;
270
- }
271
- #smile{
272
- font-size:150%;
273
- float:right;
274
- }
275
- #smile a{
276
- text-decoration:none;
277
- }
278
-
279
- .small{
280
- font-size:70%;
281
- }
282
-
283
- code, pre{
284
- font-face:mono;
285
- margin:0px;
286
- padding:0px;
287
- }
288
-
289
- .source{
290
- display:none;
291
- border:1px solid #005;
292
- # background:#111;
293
- width:98%;
294
-
295
- # background-color: #232323;
296
- # border: 1px solid black;
297
- # font-family: 'Courier New', 'Terminal', monospace;
298
- # color: #E6E0DB;
299
- padding: 3px 5px;
300
- # margin-right:1em;
301
- overflow: auto;
302
- font-size: 12px;
303
- background-color: #f8f8f8;
304
- border: 1px solid silver;
305
- font-family: 'Courier New', 'Terminal', monospace;
306
- color: #000;
307
- }
308
-
309
- #/*railscasts*/
310
- #.source .an { color:#E7BE69 } /* html attribute */
311
- #.source .c { color:#BC9358; font-style: italic; } /* comment */
312
- #.source .ch { color:#509E4F } /* escaped character */
313
- #.source .cl { color:#FFF } /* class */
314
- #.source .co { color:#FFF } /* constant */
315
- #.source .fl { color:#A4C260 } /* float */
316
- #.source .fu { color:#FFC56D } /* function */
317
- #.source .gv { color:#D0CFFE } /* global variable */
318
- #.source .i { color:#A4C260 } /* integer */
319
- #.source .il { background:#151515 } /* inline code */
320
- #.source .iv { color:#D0CFFE } /* instance variable */
321
- #.source .pp { color:#E7BE69 } /* doctype */
322
- #.source .r { color:#CB7832 } /* keyword */
323
- #.source .rx { color:#A4C260 } /* regex */
324
- #.source .s { color:#A4C260 } /* string */
325
- #.source .sy { color:#6C9CBD } /* symbol */
326
- #.source .ta { color:#E7BE69 } /* html tag */
327
- #.source .pc { color:#6C9CBD } /* boolean */
328
-
329
- # http://coderay.rubychan.de/
330
- .source pre { margin: 0px; }
331
-
332
- span.source { white-space: pre; border: 0px; padding: 2px; }
333
-
334
- table.source { border-collapse: collapse; width: 100%; padding: 2px; }
335
- table.source td { padding: 2px 4px; vertical-align: top; }
336
-
337
- .source .line_numbers, .source .no {
338
- background-color: #def;
339
- color: gray;
340
- text-align: right;
341
- }
342
- .source .line_numbers a:target, .source .no a:target { color: blue; }
343
- .source .line_numbers .highlighted, .source .no .highlighted { color: red; }
344
- .source .no { padding: 0px 4px; }
345
- .source .code { width: 100%; }
346
- .source .code pre { overflow: auto; }
347
-
348
- .source .debug { color:white ! important; background:blue ! important; }
349
-
350
- .source .an { color:#007 }
351
- .source .at { color:#f08 }
352
- .source .av { color:#700 }
353
- .source .bi { color:#509; font-weight:bold }
354
- .source .c { color:#888; }
355
- .source .c .dl { color:#444; }
356
- .source .c .ch { color:#444; }
357
-
358
- .source .ch { color:#04D }
359
- .source .ch .k { color:#04D }
360
- .source .ch .dl { color:#039 }
361
-
362
- .source .cl { color:#B06; font-weight:bold }
363
- .source .cm { color:#A08; font-weight:bold }
364
- .source .co { color:#036; font-weight:bold }
365
- .source .cr { color:#0A0 }
366
- .source .cv { color:#369 }
367
- .source .de { color:#B0B; }
368
- .source .df { color:#099; font-weight:bold }
369
- .source .di { color:#088; font-weight:bold }
370
- .source .dl { color:black }
371
- .source .do { color:#970 }
372
- .source .dt { color:#34b }
373
- .source .ds { color:#D42; font-weight:bold }
374
- .source .e { color:#666; font-weight:bold }
375
- .source .en { color:#800; font-weight:bold }
376
- .source .er { color:#F00; background-color:#FAA }
377
- .source .ex { color:#C00; font-weight:bold }
378
- .source .fl { color:#60E; font-weight:bold }
379
- .source .fu { color:#06B; font-weight:bold }
380
- .source .gv { color:#d70; font-weight:bold }
381
- .source .hx { color:#058; font-weight:bold }
382
- .source .i { color:#00D; font-weight:bold }
383
- .source .ic { color:#B44; font-weight:bold }
384
-
385
- .source .il { background-color: hsla(0,0%,0%,0.1); color: black }
386
- .source .il .idl { font-weight: bold; color: #666 }
387
- .source .idl { font-weight: bold; background-color: hsla(0,0%,0%,0.1); color: #666; }
388
-
389
- .source .im { color:#f00; }
390
- .source .in { color:#B2B; font-weight:bold }
391
- .source .iv { color:#33B }
392
- .source .la { color:#970; font-weight:bold }
393
- .source .lv { color:#963 }
394
- .source .ns { color:#707; font-weight:bold }
395
- .source .oc { color:#40E; font-weight:bold }
396
- .source .op { }
397
- .source .pc { color:#058; font-weight:bold }
398
- .source .pd { color:#369; font-weight:bold }
399
- .source .pp { color:#579; }
400
- .source .ps { color:#00C; font-weight:bold }
401
- .source .pt { color:#074; font-weight:bold }
402
- .source .r, .kw { color:#080; font-weight:bold }
403
-
404
- .source .ke { color: #808; }
405
- .source .ke .dl { color: #606; }
406
- .source .ke .ch { color: #80f; }
407
- .source .vl { color: #088; }
408
-
409
- .source .rx { background-color:hsla(300,100%,50%,0.1); }
410
- .source .rx .k { color:#808 }
411
- .source .rx .dl { color:#404 }
412
- .source .rx .mod { color:#C2C }
413
- .source .rx .fu { color:#404; font-weight: bold }
414
-
415
- .source .s { background-color:hsla(0,100%,50%,0.1); }
416
- .source .s .k { color: #D20; }
417
- .source .s .ch { color: #b0b; }
418
- .source .s .dl { color: #710; }
419
-
420
- .source .sh { background-color:hsla(120,100%,50%,0.1); }
421
- .source .sh .k { color:#2B2 }
422
- .source .sh .dl { color:#161 }
423
-
424
- .source .sy { color:#A60 }
425
- .source .sy .k { color:#A60 }
426
- .source .sy .dl { color:#630 }
427
-
428
- .source .ta { color:#070 }
429
- .source .ts { color:#D70; font-weight:bold }
430
- .source .ty { color:#339; font-weight:bold }
431
- .source .v { color:#036 }
432
- .source .xt { color:#444 }
433
-
434
- .source .ins { background: hsla(120,100%,50%,0.2) }
435
- .source .del { background: hsla(0,100%,50%,0.2) }
436
- .source .chg { color: #aaf; background: #007; }
437
- .source .head { color: #f8f; background: #505 }
438
- .source .head .filename { color: white; }
439
-
440
- .source .ins .eye { background-color: hsla(120,100%,50%,0.2) }
441
- .source .del .eye { background-color: hsla(0,100%,50%,0.2) }
442
-
443
- .source .ins .ins { color: #080; background:transparent; font-weight:bold }
444
- .source .del .del { color: #800; background:transparent; font-weight:bold }
445
- .source .chg .chg { color: #66f; }
446
- .source .head .head { color: #f4f; }
447
-
448
-
449
-
450
- </style>
451
- </head>
452
- <body>
453
- <div id="world">
454
-
455
- <h1>Ruby Zucker ..version..</h1>
456
- <h2>What is it?</h2>
457
- <p class="text">Zucker is the German word for sugar (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>). This gem adds syntactical sugar in the form of independent, lightweight scripts that make Ruby even more sweet. Read <a href="http://rbjl.net/32-introducing-ruby-zucker-a-new-syntactical-sugar-gem">this blog post</a> for a little introduction.</p>
458
-
459
- <h2>Install</h2>
460
- <p class="text">
461
- <code class="scode">gem install zucker # might need sudo</code>
462
- </p>
463
-
464
- <h2>Usage / Organisation</h2>
465
- <p class="text">The gem consists of many small snippets, called <em>cubes</em>, which are bundled in <em>packages</em>. Currently, there are two packages available: <strong>default</strong> and <strong>debug</strong>. You can use a package be requiring it in this way:
466
- <code class="scode">require 'zucker/default'</code>
467
- and
468
- <code class="scode">require 'zucker/debug'</code>
469
-
470
- Since there aren't any dependencies within the gem, you could also pick only the cubes you want:
471
-
472
- <code class="scode">require 'zucker/egonil'</code>
473
- </p>
474
-
475
- <p class="text">You can also lock your require to a specific version of Zucker by simply putting the version before the cube name in this way:
476
- <code>require 'zucker/1/egonil'</code>. Future releases of the gem will include all previous (main) versions, so the behaviour of these directly required cubes will not change (except for critical bugs).</p>
477
-
478
- <h2 title="require 'zucker/all'">Cubes</h2>
479
- <div class="cubes">
480
- ....
481
- </div>
482
- <br/>
483
- </div>
484
- <div id="foot">
485
- <div id="smile"><a href="http://rbjl.net">J-_-L</a></div>
486
- This is the Ruby Zucker ..version.. documentation.
487
- The current version is always available at <a href="http://rubyzucker.info">rubyzucker.info</a>.
488
- Gem source can be found at <a href="http://github.com/janlelis/zucker">github</a>.
489
- </div>
490
-
491
- </body>
492
- </html>
493
-