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