facets 1.4.5 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1429) hide show
  1. data/demo/tkxml/helloworld.rb +32 -0
  2. data/demo/tkxml/ui.xml +32 -0
  3. data/doc/AUTHORS +2 -0
  4. data/doc/ChangeLog +92 -337
  5. data/doc/ChangeLog.pre1.5 +337 -0
  6. data/doc/LATEST +41 -0
  7. data/doc/manifest +1209 -0
  8. data/lib/facet/array/op_div.rb +1 -0
  9. data/lib/facet/autoarray.rb +1 -0
  10. data/lib/facet/cut.rb +1 -0
  11. data/lib/facet/enumerable/divide.rb +1 -0
  12. data/lib/facet/eventhook.rb +1 -0
  13. data/lib/facet/hash/diff.rb +1 -0
  14. data/lib/facet/hash/having_aquisition.rb +1 -0
  15. data/lib/facet/hash/having_fallback.rb +1 -0
  16. data/lib/facet/hash/normalize_keys.rb +1 -0
  17. data/lib/facet/hash/op_div.rb +1 -0
  18. data/lib/facet/hash/reverse_merge.rb +1 -0
  19. data/lib/facet/hash/reverse_update.rb +1 -0
  20. data/lib/facet/hash/self/auto.rb +1 -0
  21. data/lib/facet/hash/symbolize_keys.rb +1 -0
  22. data/lib/facet/hash/to_struct.rb +1 -0
  23. data/lib/facet/infinity.rb +1 -0
  24. data/lib/facet/instance_intercept.rb +1 -0
  25. data/lib/facet/integer/each.rb +1 -0
  26. data/lib/facet/integer/of.rb +1 -0
  27. data/lib/facet/kernel/callee.rb +1 -0
  28. data/lib/facet/kernel/deep_clone.rb +1 -0
  29. data/lib/facet/kernel/instance_exec.rb +1 -0
  30. data/lib/facet/kernel/meta.rb +1 -0
  31. data/lib/facet/kernel/object_clone.rb +1 -0
  32. data/lib/facet/kernel/object_dup.rb +1 -0
  33. data/lib/facet/kernel/to_data.rb +1 -0
  34. data/lib/facet/methodfilter.rb +1 -0
  35. data/lib/facet/numeric/distance.rb +1 -0
  36. data/lib/facet/predicate.rb +1 -0
  37. data/lib/facet/rwdelegator.rb +1 -0
  38. data/lib/facet/settings.rb +1 -0
  39. data/lib/facet/string/divide.rb +1 -0
  40. data/lib/facet/symbol/self/generate.rb +1 -0
  41. data/lib/facet/tkxml.rb +1 -0
  42. data/lib/facets.rb +4 -2
  43. data/lib/facets/core/array/op_div.rb +11 -0
  44. data/lib/facets/core/enumerable/divide.rb +20 -0
  45. data/lib/facets/core/hash/diff.rb +8 -0
  46. data/lib/facets/core/hash/having_aquisition.rb +37 -0
  47. data/lib/facets/core/hash/having_fallback.rb +28 -0
  48. data/lib/facets/core/hash/keys_to_s.rb +2 -80
  49. data/lib/facets/core/hash/keys_to_sym.rb +2 -91
  50. data/lib/facets/core/hash/normalize_keys.rb +65 -0
  51. data/lib/facets/core/hash/op_div.rb +8 -0
  52. data/lib/facets/core/hash/reverse_merge.rb +22 -0
  53. data/lib/facets/core/hash/reverse_update.rb +3 -0
  54. data/lib/facets/core/hash/self/auto.rb +28 -0
  55. data/lib/facets/core/hash/stringify_keys.rb +74 -2
  56. data/lib/facets/core/hash/symbolize_keys.rb +87 -0
  57. data/lib/facets/core/hash/to_struct.rb +16 -0
  58. data/lib/facets/core/integer/each.rb +9 -0
  59. data/lib/facets/core/integer/of.rb +37 -0
  60. data/lib/facets/core/kernel/__method__.rb +2 -45
  61. data/lib/facets/core/kernel/callee.rb +46 -0
  62. data/lib/facets/core/kernel/deep_clone.rb +50 -0
  63. data/lib/facets/core/kernel/instance_exec.rb +58 -0
  64. data/lib/facets/core/kernel/meta.rb +21 -0
  65. data/lib/facets/core/kernel/object_clone.rb +4 -0
  66. data/lib/facets/core/kernel/object_dup.rb +2 -0
  67. data/lib/facets/core/kernel/to_data.rb +114 -0
  68. data/lib/facets/core/module/alias_method_chain.rb +1 -1
  69. data/lib/facets/core/module/wrap_method.rb +2 -2
  70. data/lib/facets/core/nilclass/status.rb +4 -4
  71. data/lib/facets/core/numeric/distance.rb +37 -0
  72. data/lib/facets/core/proc/compose.rb +3 -21
  73. data/lib/facets/core/proc/op_mul.rb +51 -2
  74. data/lib/facets/core/proc/to_method.rb +37 -36
  75. data/lib/facets/core/string/divide.rb +43 -0
  76. data/lib/facets/core/string/singular.rb +152 -67
  77. data/lib/facets/core/symbol/self/generate.rb +18 -0
  78. data/lib/facets/more/annattr.rb +4 -4
  79. data/lib/facets/more/annotation.rb +359 -296
  80. data/lib/facets/more/aspects.rb +1 -1
  81. data/lib/facets/more/autoarray.rb +82 -0
  82. data/lib/facets/more/builderobject.rb +5 -3
  83. data/lib/facets/more/command.rb +2 -0
  84. data/lib/facets/more/cut.rb +507 -0
  85. data/lib/facets/more/dictionary.rb +64 -30
  86. data/lib/facets/more/downloader.rb +6 -3
  87. data/lib/facets/more/elementor.rb +26 -16
  88. data/lib/facets/more/eventhook.rb +113 -0
  89. data/lib/facets/more/filelist.rb +8 -0
  90. data/lib/facets/more/functor.rb +28 -11
  91. data/lib/facets/more/hashbuilder.rb +7 -3
  92. data/lib/facets/more/infinity.rb +221 -0
  93. data/{snip/more/aspect.rb → lib/facets/more/instance_intercept.rb} +56 -20
  94. data/lib/facets/more/json.rb +5 -5
  95. data/lib/facets/more/methodfilter.rb +118 -0
  96. data/lib/facets/more/opencascade.rb +35 -66
  97. data/lib/facets/more/openobject.rb +213 -162
  98. data/lib/facets/more/orderedhash.rb +7 -0
  99. data/{snip → lib/facets}/more/predicate.rb +3 -0
  100. data/lib/facets/more/recorder.rb +9 -3
  101. data/lib/facets/more/reference.rb +7 -2
  102. data/lib/facets/more/rexmlbuilder.rb +7 -2
  103. data/lib/facets/more/rwdelegator.rb +51 -0
  104. data/lib/facets/more/settings.rb +219 -0
  105. data/lib/facets/more/snapshot.rb +4 -2
  106. data/lib/facets/more/tagiterator.rb +4 -4
  107. data/lib/facets/more/taskable.rb +5 -5
  108. data/lib/facets/more/tkxml.rb +171 -0
  109. data/meta/projectinfo +38 -0
  110. data/{Reapfile → meta/reapfile} +0 -0
  111. data/meta/task +74 -0
  112. data/meta/tasks/calibre.rb +16 -0
  113. data/meta/version +1 -0
  114. data/test/lib/facets/core/array/test_at_rand.rb +1 -1
  115. data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
  116. data/test/lib/facets/core/array/test_delete_values.rb +1 -1
  117. data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
  118. data/test/lib/facets/core/array/test_first.rb +1 -1
  119. data/test/lib/facets/core/array/test_head.rb +1 -1
  120. data/test/lib/facets/core/array/test_last_index.rb +1 -1
  121. data/test/lib/facets/core/array/test_merge.rb +1 -1
  122. data/test/lib/facets/core/array/test_mid.rb +1 -1
  123. data/test/lib/facets/core/array/test_middle.rb +1 -1
  124. data/test/lib/facets/core/array/test_op_fetch.rb +1 -1
  125. data/test/lib/facets/core/array/test_op_store.rb +1 -1
  126. data/test/lib/facets/core/array/test_pick.rb +1 -1
  127. data/test/lib/facets/core/array/test_pos.rb +1 -1
  128. data/test/lib/facets/core/array/test_pot.rb +1 -1
  129. data/test/lib/facets/core/array/test_pull.rb +1 -1
  130. data/test/lib/facets/core/array/test_rand_index.rb +1 -1
  131. data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
  132. data/test/lib/facets/core/array/test_range.rb +1 -1
  133. data/test/lib/facets/core/array/test_rotate.rb +1 -1
  134. data/test/lib/facets/core/array/test_select.rb +1 -1
  135. data/test/lib/facets/core/array/test_shuffle.rb +1 -1
  136. data/test/lib/facets/core/array/test_thru.rb +1 -1
  137. data/test/lib/facets/core/array/test_to_b.rb +1 -1
  138. data/test/lib/facets/core/array/test_to_h.rb +1 -1
  139. data/test/lib/facets/core/array/test_to_hash.rb +1 -1
  140. data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
  141. data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
  142. data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
  143. data/test/lib/facets/core/binding/test_called.rb +1 -1
  144. data/test/lib/facets/core/binding/test_caller.rb +1 -1
  145. data/test/lib/facets/core/binding/test_defined.rb +1 -1
  146. data/test/lib/facets/core/binding/test_eval.rb +1 -1
  147. data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
  148. data/test/lib/facets/core/binding/test_method_name.rb +1 -1
  149. data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
  150. data/test/lib/facets/core/binding/test_op_store.rb +1 -1
  151. data/test/lib/facets/core/binding/test_self.rb +1 -1
  152. data/test/lib/facets/core/class/test_cattr.rb +1 -1
  153. data/test/lib/facets/core/class/test_descendents.rb +1 -1
  154. data/test/lib/facets/core/class/test_method_name.rb +1 -1
  155. data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
  156. data/test/lib/facets/core/class/test_unix_path.rb +1 -1
  157. data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
  158. data/test/lib/facets/core/comparable/test_clip.rb +1 -1
  159. data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
  160. data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
  161. data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
  162. data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
  163. data/test/lib/facets/core/date/test_stamp.rb +1 -1
  164. data/test/lib/facets/core/date/test_to_date.rb +1 -1
  165. data/test/lib/facets/core/date/test_to_s.rb +1 -1
  166. data/test/lib/facets/core/date/test_to_time.rb +1 -1
  167. data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
  168. data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
  169. data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
  170. data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
  171. data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
  172. data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
  173. data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
  174. data/test/lib/facets/core/enumerable/test_count.rb +1 -1
  175. data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
  176. data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
  177. data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
  178. data/test/lib/facets/core/enumerable/test_each_slice.rb +1 -1
  179. data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
  180. data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
  181. data/test/lib/facets/core/enumerable/test_every.rb +1 -1
  182. data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
  183. data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
  184. data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
  185. data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
  186. data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
  187. data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
  188. data/test/lib/facets/core/enumerable/test_none.rb +1 -1
  189. data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
  190. data/test/lib/facets/core/enumerable/test_one.rb +1 -1
  191. data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
  192. data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
  193. data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
  194. data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
  195. data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
  196. data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
  197. data/test/lib/facets/core/file/self/test_create.rb +1 -1
  198. data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
  199. data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
  200. data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
  201. data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
  202. data/test/lib/facets/core/float/test_round_at.rb +1 -1
  203. data/test/lib/facets/core/float/test_round_to.rb +1 -1
  204. data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
  205. data/test/lib/facets/core/hash/test_alias.rb +1 -1
  206. data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
  207. data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
  208. data/test/lib/facets/core/hash/test_at.rb +1 -1
  209. data/test/lib/facets/core/hash/test_collate.rb +1 -1
  210. data/test/lib/facets/core/hash/test_each.rb +1 -1
  211. data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
  212. data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
  213. data/test/lib/facets/core/hash/test_graph.rb +1 -1
  214. data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
  215. data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
  216. data/test/lib/facets/core/hash/test_inverse.rb +1 -1
  217. data/test/lib/facets/core/hash/test_normalize_keys.rb +34 -0
  218. data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
  219. data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
  220. data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
  221. data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
  222. data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
  223. data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
  224. data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
  225. data/test/lib/facets/core/hash/test_slice.rb +1 -1
  226. data/test/lib/facets/core/hash/{test_keys_to_s.rb → test_stringify_keys.rb} +5 -5
  227. data/test/lib/facets/core/hash/test_swap.rb +1 -1
  228. data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
  229. data/test/lib/facets/core/hash/{test_keys_to_sym.rb → test_symbolize_keys.rb} +5 -5
  230. data/test/lib/facets/core/hash/test_to_h.rb +1 -1
  231. data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
  232. data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
  233. data/test/lib/facets/core/hash/test_traverse.rb +1 -1
  234. data/test/lib/facets/core/hash/test_update_each.rb +1 -1
  235. data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
  236. data/test/lib/facets/core/hash/test_update_values.rb +1 -1
  237. data/test/lib/facets/core/hash/test_weave.rb +1 -1
  238. data/test/lib/facets/core/integer/test_factorial.rb +1 -1
  239. data/test/lib/facets/core/integer/test_multiple.rb +1 -1
  240. data/test/lib/facets/core/integer/test_of.rb +28 -0
  241. data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
  242. data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
  243. data/test/lib/facets/core/kernel/test___class__.rb +1 -1
  244. data/test/lib/facets/core/kernel/test___method__.rb +1 -1
  245. data/test/lib/facets/core/kernel/test_as.rb +1 -1
  246. data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
  247. data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
  248. data/test/lib/facets/core/kernel/test_bool.rb +1 -1
  249. data/test/lib/facets/core/kernel/test_bug.rb +1 -1
  250. data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
  251. data/test/lib/facets/core/kernel/test_called.rb +1 -1
  252. data/test/lib/facets/core/kernel/test_callee.rb +26 -0
  253. data/test/lib/facets/core/kernel/test_constant.rb +1 -1
  254. data/test/lib/facets/core/kernel/test_copy.rb +1 -1
  255. data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
  256. data/test/lib/facets/core/kernel/test_demo.rb +1 -1
  257. data/test/lib/facets/core/kernel/test_fn.rb +1 -1
  258. data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
  259. data/test/lib/facets/core/kernel/test_here.rb +1 -1
  260. data/test/lib/facets/core/kernel/test_in.rb +1 -1
  261. data/test/lib/facets/core/kernel/test_instance_exec.rb +52 -0
  262. data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
  263. data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
  264. data/test/lib/facets/core/kernel/test_method.rb +1 -1
  265. data/test/lib/facets/core/kernel/test_methods.rb +1 -1
  266. data/test/lib/facets/core/kernel/test_new.rb +1 -1
  267. data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
  268. data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
  269. data/test/lib/facets/core/kernel/test_quaclass.rb +1 -1
  270. data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
  271. data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
  272. data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
  273. data/test/lib/facets/core/kernel/test_resc.rb +1 -1
  274. data/test/lib/facets/core/kernel/test_returning.rb +1 -1
  275. data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
  276. data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
  277. data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
  278. data/test/lib/facets/core/kernel/test_silently.rb +1 -1
  279. data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
  280. data/test/lib/facets/core/kernel/test_singleton_class.rb +1 -1
  281. data/test/lib/facets/core/kernel/test_superior.rb +1 -1
  282. data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
  283. data/test/lib/facets/core/kernel/test_this.rb +1 -1
  284. data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
  285. data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
  286. data/test/lib/facets/core/kernel/test_to_data.rb +59 -0
  287. data/test/lib/facets/core/kernel/test_uri.rb +1 -1
  288. data/test/lib/facets/core/kernel/test_val.rb +1 -1
  289. data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
  290. data/test/lib/facets/core/matchdata/test_match.rb +1 -1
  291. data/test/lib/facets/core/matchdata/test_matchtree.rb +1 -1
  292. data/test/lib/facets/core/module/test_abstract.rb +1 -1
  293. data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
  294. data/test/lib/facets/core/module/test_ancestor.rb +1 -1
  295. data/test/lib/facets/core/module/test_basename.rb +1 -1
  296. data/test/lib/facets/core/module/test_by_name.rb +1 -1
  297. data/test/lib/facets/core/module/test_class_extension.rb +1 -1
  298. data/test/lib/facets/core/module/test_clone_using.rb +1 -1
  299. data/test/lib/facets/core/module/test_dirname.rb +1 -1
  300. data/test/lib/facets/core/module/test_equate_on.rb +1 -1
  301. data/test/lib/facets/core/module/test_include_as.rb +1 -1
  302. data/test/lib/facets/core/module/test_initializer.rb +1 -1
  303. data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
  304. data/test/lib/facets/core/module/test_integrate.rb +1 -1
  305. data/test/lib/facets/core/module/test_memoize.rb +1 -1
  306. data/test/lib/facets/core/module/test_modspace.rb +1 -1
  307. data/test/lib/facets/core/module/test_namespace.rb +1 -1
  308. data/test/lib/facets/core/module/test_nesting.rb +1 -1
  309. data/test/lib/facets/core/module/test_nodef.rb +1 -1
  310. data/test/lib/facets/core/module/test_on_included.rb +1 -1
  311. data/test/lib/facets/core/module/test_redef.rb +1 -1
  312. data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
  313. data/test/lib/facets/core/module/test_redirect.rb +1 -1
  314. data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
  315. data/test/lib/facets/core/module/test_remove.rb +1 -1
  316. data/test/lib/facets/core/module/test_rename.rb +1 -1
  317. data/test/lib/facets/core/module/test_rename_method.rb +1 -1
  318. data/test/lib/facets/core/module/test_revisal.rb +1 -1
  319. data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
  320. data/test/lib/facets/core/module/test_sort_on.rb +1 -1
  321. data/test/lib/facets/core/module/test_this.rb +1 -1
  322. data/test/lib/facets/core/module/test_wrap.rb +1 -1
  323. data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
  324. data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
  325. data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
  326. data/test/lib/facets/core/nilclass/test_include.rb +1 -1
  327. data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
  328. data/test/lib/facets/core/nilclass/test_size.rb +1 -1
  329. data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
  330. data/test/lib/facets/core/numeric/test_approx.rb +1 -1
  331. data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
  332. data/test/lib/facets/core/numeric/test_distance.rb +28 -0
  333. data/test/lib/facets/core/numeric/test_succ.rb +1 -1
  334. data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
  335. data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
  336. data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
  337. data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
  338. data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
  339. data/test/lib/facets/core/proc/test_compose.rb +1 -8
  340. data/test/lib/facets/core/proc/test_op_mul.rb +34 -0
  341. data/test/lib/facets/core/proc/test_to_method.rb +15 -2
  342. data/test/lib/facets/core/range/test_to_r.rb +1 -1
  343. data/test/lib/facets/core/range/test_to_range.rb +1 -1
  344. data/test/lib/facets/core/range/test_umbrella.rb +1 -1
  345. data/test/lib/facets/core/range/test_within.rb +1 -1
  346. data/test/lib/facets/core/regexp/test_arity.rb +1 -1
  347. data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
  348. data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
  349. data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
  350. data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
  351. data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
  352. data/test/lib/facets/core/string/test_align_center.rb +1 -1
  353. data/test/lib/facets/core/string/test_at_rand.rb +1 -1
  354. data/test/lib/facets/core/string/test_basename.rb +1 -1
  355. data/test/lib/facets/core/string/test_blank.rb +1 -1
  356. data/test/lib/facets/core/string/test_bracket.rb +1 -1
  357. data/test/lib/facets/core/string/test_camelcase.rb +1 -1
  358. data/test/lib/facets/core/string/test_camelize.rb +1 -1
  359. data/test/lib/facets/core/string/test_capitalized.rb +1 -1
  360. data/test/lib/facets/core/string/test_chars.rb +1 -1
  361. data/test/lib/facets/core/string/test_cmp.rb +1 -1
  362. data/test/lib/facets/core/string/test_demodulize.rb +1 -1
  363. data/test/lib/facets/core/string/test_divide.rb +29 -0
  364. data/test/lib/facets/core/string/test_downcase.rb +1 -1
  365. data/test/lib/facets/core/string/test_dresner.rb +1 -1
  366. data/test/lib/facets/core/string/test_each_char.rb +1 -1
  367. data/test/lib/facets/core/string/test_each_word.rb +1 -1
  368. data/test/lib/facets/core/string/test_first.rb +1 -1
  369. data/test/lib/facets/core/string/test_fold.rb +1 -1
  370. data/test/lib/facets/core/string/test_humanize.rb +1 -1
  371. data/test/lib/facets/core/string/test_indent.rb +1 -1
  372. data/test/lib/facets/core/string/test_index_all.rb +1 -1
  373. data/test/lib/facets/core/string/test_last.rb +1 -1
  374. data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
  375. data/test/lib/facets/core/string/test_lines.rb +1 -1
  376. data/test/lib/facets/core/string/test_lowercase.rb +1 -1
  377. data/test/lib/facets/core/string/test_margin.rb +1 -1
  378. data/test/lib/facets/core/string/test_methodize.rb +1 -1
  379. data/test/lib/facets/core/string/test_modulize.rb +1 -1
  380. data/test/lib/facets/core/string/test_mscan.rb +1 -1
  381. data/test/lib/facets/core/string/test_natcmp.rb +1 -1
  382. data/test/lib/facets/core/string/test_nchar.rb +1 -1
  383. data/test/lib/facets/core/string/test_pathize.rb +1 -1
  384. data/test/lib/facets/core/string/test_pop.rb +1 -1
  385. data/test/lib/facets/core/string/test_pot.rb +1 -1
  386. data/test/lib/facets/core/string/test_push.rb +1 -1
  387. data/test/lib/facets/core/string/test_quote.rb +1 -1
  388. data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
  389. data/test/lib/facets/core/string/test_rand_index.rb +1 -1
  390. data/test/lib/facets/core/string/test_range.rb +1 -1
  391. data/test/lib/facets/core/string/test_range_all.rb +1 -1
  392. data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
  393. data/test/lib/facets/core/string/test_regesc.rb +1 -1
  394. data/test/lib/facets/core/string/test_shatter.rb +1 -1
  395. data/test/lib/facets/core/string/test_shift.rb +1 -1
  396. data/test/lib/facets/core/string/test_shuffle.rb +1 -1
  397. data/test/lib/facets/core/string/test_similarity.rb +1 -1
  398. data/test/lib/facets/core/string/test_singular.rb +62 -8
  399. data/test/lib/facets/core/string/test_soundex.rb +1 -1
  400. data/test/lib/facets/core/string/test_succ.rb +1 -1
  401. data/test/lib/facets/core/string/test_to_a.rb +1 -1
  402. data/test/lib/facets/core/string/test_to_b.rb +1 -1
  403. data/test/lib/facets/core/string/test_to_const.rb +1 -1
  404. data/test/lib/facets/core/string/test_to_date.rb +1 -1
  405. data/test/lib/facets/core/string/test_to_proc.rb +1 -1
  406. data/test/lib/facets/core/string/test_to_re.rb +1 -1
  407. data/test/lib/facets/core/string/test_to_time.rb +1 -1
  408. data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
  409. data/test/lib/facets/core/string/test_unpack.rb +1 -1
  410. data/test/lib/facets/core/string/test_unshift.rb +1 -1
  411. data/test/lib/facets/core/string/test_upcase.rb +1 -1
  412. data/test/lib/facets/core/string/test_whitespace.rb +1 -1
  413. data/test/lib/facets/core/string/test_word_filter.rb +1 -1
  414. data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
  415. data/test/lib/facets/core/string/test_words.rb +1 -1
  416. data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
  417. data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
  418. data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
  419. data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
  420. data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
  421. data/test/lib/facets/core/symbol/test_not.rb +1 -1
  422. data/test/lib/facets/core/symbol/test_pad.rb +1 -1
  423. data/test/lib/facets/core/symbol/test_succ.rb +1 -1
  424. data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
  425. data/test/lib/facets/core/symbol/test_to_proc.rb +1 -1
  426. data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
  427. data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
  428. data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
  429. data/test/lib/facets/core/time/test_change.rb +1 -1
  430. data/test/lib/facets/core/time/test_elapse.rb +1 -1
  431. data/test/lib/facets/core/time/test_stamp.rb +1 -1
  432. data/test/lib/facets/core/time/test_to_date.rb +1 -1
  433. data/test/lib/facets/core/time/test_to_s.rb +1 -1
  434. data/test/lib/facets/core/time/test_to_time.rb +1 -1
  435. data/test/lib/facets/more/test_annattr.rb +1 -1
  436. data/test/lib/facets/more/test_annotation.rb +225 -113
  437. data/test/lib/facets/more/test_ansicode.rb +1 -1
  438. data/test/lib/facets/more/test_association.rb +1 -1
  439. data/test/lib/facets/more/test_autoarray.rb +32 -0
  440. data/test/lib/facets/more/test_basicobject.rb +1 -1
  441. data/test/lib/facets/more/test_bbcode.rb +1 -1
  442. data/test/lib/facets/more/test_binaryreader.rb +1 -1
  443. data/test/lib/facets/more/test_bitmask.rb +1 -1
  444. data/test/lib/facets/more/test_bytes.rb +1 -1
  445. data/test/lib/facets/more/test_classmethods.rb +1 -1
  446. data/test/lib/facets/more/test_command.rb +1 -1
  447. data/test/lib/facets/more/test_coroutine.rb +1 -1
  448. data/test/lib/facets/more/test_crypt.rb +1 -1
  449. data/test/lib/facets/more/test_cut.rb +198 -0
  450. data/test/lib/facets/more/test_dictionary.rb +1 -1
  451. data/test/lib/facets/more/test_elementor.rb +5 -1
  452. data/test/lib/facets/more/test_enumerablepass.rb +1 -1
  453. data/test/lib/facets/more/test_floatstring.rb +1 -1
  454. data/test/lib/facets/more/test_functor.rb +1 -1
  455. data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
  456. data/test/lib/facets/more/test_infinity.rb +50 -0
  457. data/test/lib/facets/more/test_inheritor.rb +1 -1
  458. data/test/lib/facets/more/test_instance_intercept.rb +50 -0
  459. data/test/lib/facets/more/test_interval.rb +1 -1
  460. data/test/lib/facets/more/test_json.rb +1 -1
  461. data/test/lib/facets/more/test_lisp.rb +1 -1
  462. data/test/lib/facets/more/test_lisp_format.rb +1 -1
  463. data/test/lib/facets/more/test_lrucache.rb +1 -1
  464. data/test/lib/facets/more/test_mathconstants.rb +1 -1
  465. data/test/lib/facets/more/test_methodfilter.rb +45 -0
  466. data/test/lib/facets/more/test_methodprobe.rb +1 -1
  467. data/test/lib/facets/more/test_multipliers.rb +1 -1
  468. data/test/lib/facets/more/test_multiton.rb +1 -1
  469. data/test/lib/facets/more/test_nackclass.rb +1 -1
  470. data/test/lib/facets/more/test_nilcomparable.rb +1 -1
  471. data/test/lib/facets/more/test_opencascade.rb +24 -15
  472. data/test/lib/facets/more/test_openobject.rb +70 -22
  473. data/test/lib/facets/more/test_overload.rb +1 -1
  474. data/test/lib/facets/more/test_paramix.rb +1 -1
  475. data/test/lib/facets/more/test_pqueue.rb +1 -1
  476. data/test/lib/facets/more/test_predicate.rb +79 -0
  477. data/test/lib/facets/more/test_preinitialize.rb +1 -1
  478. data/test/lib/facets/more/test_promoteself.rb +1 -1
  479. data/test/lib/facets/more/test_recorder.rb +1 -1
  480. data/test/lib/facets/more/test_snapshot.rb +1 -1
  481. data/test/lib/facets/more/test_statichash.rb +1 -1
  482. data/test/lib/facets/more/test_syncarray.rb +1 -1
  483. data/test/lib/facets/more/test_synchash.rb +1 -1
  484. data/test/lib/facets/more/test_tagiterator.rb +1 -1
  485. data/test/lib/facets/more/test_taskable.rb +1 -1
  486. data/test/lib/facets/more/test_timer.rb +1 -1
  487. data/test/lib/facets/more/test_times.rb +1 -1
  488. data/test/lib/facets/more/test_tuple.rb +1 -1
  489. data/test/lib/facets/more/test_typecast.rb +1 -1
  490. data/test/lib/facets/more/test_uninheritable.rb +1 -1
  491. data/test/lib/facets/more/test_units.rb +1 -1
  492. data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
  493. data/test/lib/facets/more/test_xmlhelper.rb +1 -1
  494. data/test/lib/facets/more/test_xoxo.rb +1 -1
  495. data/test/lib/facets/more/test_yamlstruct.rb +1 -1
  496. metadata +1147 -2081
  497. data/doc/api/core/classes/Array.html +0 -1356
  498. data/doc/api/core/classes/Binding.html +0 -538
  499. data/doc/api/core/classes/Class.html +0 -476
  500. data/doc/api/core/classes/Comparable.html +0 -231
  501. data/doc/api/core/classes/Config.html +0 -120
  502. data/doc/api/core/classes/Continuation.html +0 -168
  503. data/doc/api/core/classes/Date.html +0 -219
  504. data/doc/api/core/classes/Dir.html +0 -208
  505. data/doc/api/core/classes/Enumerable.html +0 -1462
  506. data/doc/api/core/classes/FalseClass.html +0 -115
  507. data/doc/api/core/classes/File.html +0 -383
  508. data/doc/api/core/classes/FileUtils.html +0 -468
  509. data/doc/api/core/classes/Float.html +0 -157
  510. data/doc/api/core/classes/Gem.html +0 -150
  511. data/doc/api/core/classes/Hash.html +0 -1627
  512. data/doc/api/core/classes/Integer.html +0 -353
  513. data/doc/api/core/classes/Kernal.html +0 -86
  514. data/doc/api/core/classes/Kernel.html +0 -2010
  515. data/doc/api/core/classes/Logger.html +0 -157
  516. data/doc/api/core/classes/MatchData.html +0 -195
  517. data/doc/api/core/classes/Module.html +0 -1812
  518. data/doc/api/core/classes/NackClass.html +0 -92
  519. data/doc/api/core/classes/NilClass.html +0 -385
  520. data/doc/api/core/classes/Numeric.html +0 -306
  521. data/doc/api/core/classes/Object.html +0 -332
  522. data/doc/api/core/classes/OpenStruct.html +0 -315
  523. data/doc/api/core/classes/Pathname.html +0 -154
  524. data/doc/api/core/classes/Proc.html +0 -154
  525. data/doc/api/core/classes/Range.html +0 -235
  526. data/doc/api/core/classes/Regexp.html +0 -185
  527. data/doc/api/core/classes/ScriptBug.html +0 -92
  528. data/doc/api/core/classes/String.html +0 -3250
  529. data/doc/api/core/classes/Symbol.html +0 -463
  530. data/doc/api/core/classes/Time.html +0 -307
  531. data/doc/api/core/classes/TrueClass.html +0 -115
  532. data/doc/api/core/classes/UnboundMethod.html +0 -121
  533. data/doc/api/core/created.rid +0 -1
  534. data/doc/api/core/files/COPYING.html +0 -517
  535. data/doc/api/core/files/README.html +0 -386
  536. data/doc/api/core/files/lib/facets/core/all_rb.html +0 -96
  537. data/doc/api/core/files/lib/facets/core/array/at_rand_rb.html +0 -92
  538. data/doc/api/core/files/lib/facets/core/array/body_rb.html +0 -100
  539. data/doc/api/core/files/lib/facets/core/array/delete_unless_rb.html +0 -92
  540. data/doc/api/core/files/lib/facets/core/array/delete_values_at_rb.html +0 -92
  541. data/doc/api/core/files/lib/facets/core/array/delete_values_rb.html +0 -92
  542. data/doc/api/core/files/lib/facets/core/array/each_with_key_rb.html +0 -92
  543. data/doc/api/core/files/lib/facets/core/array/first_rb.html +0 -96
  544. data/doc/api/core/files/lib/facets/core/array/foot_rb.html +0 -100
  545. data/doc/api/core/files/lib/facets/core/array/head_rb.html +0 -92
  546. data/doc/api/core/files/lib/facets/core/array/join_sentence_rb.html +0 -92
  547. data/doc/api/core/files/lib/facets/core/array/last_index_rb.html +0 -92
  548. data/doc/api/core/files/lib/facets/core/array/last_rb.html +0 -100
  549. data/doc/api/core/files/lib/facets/core/array/merge_rb.html +0 -92
  550. data/doc/api/core/files/lib/facets/core/array/mid_rb.html +0 -92
  551. data/doc/api/core/files/lib/facets/core/array/middle_rb.html +0 -92
  552. data/doc/api/core/files/lib/facets/core/array/op_fetch_rb.html +0 -92
  553. data/doc/api/core/files/lib/facets/core/array/op_mod_rb.html +0 -92
  554. data/doc/api/core/files/lib/facets/core/array/op_store_rb.html +0 -96
  555. data/doc/api/core/files/lib/facets/core/array/pick_rb.html +0 -92
  556. data/doc/api/core/files/lib/facets/core/array/pos_rb.html +0 -92
  557. data/doc/api/core/files/lib/facets/core/array/pot_rb.html +0 -92
  558. data/doc/api/core/files/lib/facets/core/array/pull_rb.html +0 -92
  559. data/doc/api/core/files/lib/facets/core/array/rand_index_rb.html +0 -92
  560. data/doc/api/core/files/lib/facets/core/array/rand_subset_rb.html +0 -92
  561. data/doc/api/core/files/lib/facets/core/array/range_rb.html +0 -92
  562. data/doc/api/core/files/lib/facets/core/array/rotate_rb.html +0 -92
  563. data/doc/api/core/files/lib/facets/core/array/select_rb.html +0 -92
  564. data/doc/api/core/files/lib/facets/core/array/shuffle_rb.html +0 -92
  565. data/doc/api/core/files/lib/facets/core/array/store_rb.html +0 -92
  566. data/doc/api/core/files/lib/facets/core/array/tail_rb.html +0 -100
  567. data/doc/api/core/files/lib/facets/core/array/thru_rb.html +0 -92
  568. data/doc/api/core/files/lib/facets/core/array/to_b_rb.html +0 -92
  569. data/doc/api/core/files/lib/facets/core/array/to_h_rb.html +0 -92
  570. data/doc/api/core/files/lib/facets/core/array/to_hash_rb.html +0 -92
  571. data/doc/api/core/files/lib/facets/core/array/unzip_rb.html +0 -92
  572. data/doc/api/core/files/lib/facets/core/binding/__DIR___rb.html +0 -100
  573. data/doc/api/core/files/lib/facets/core/binding/__FILE___rb.html +0 -100
  574. data/doc/api/core/files/lib/facets/core/binding/__LINE___rb.html +0 -96
  575. data/doc/api/core/files/lib/facets/core/binding/call_stack_rb.html +0 -97
  576. data/doc/api/core/files/lib/facets/core/binding/called_rb.html +0 -96
  577. data/doc/api/core/files/lib/facets/core/binding/caller_rb.html +0 -96
  578. data/doc/api/core/files/lib/facets/core/binding/defined_rb.html +0 -96
  579. data/doc/api/core/files/lib/facets/core/binding/eval_rb.html +0 -92
  580. data/doc/api/core/files/lib/facets/core/binding/local_variables_rb.html +0 -96
  581. data/doc/api/core/files/lib/facets/core/binding/method_name_rb.html +0 -96
  582. data/doc/api/core/files/lib/facets/core/binding/op_fetch_rb.html +0 -97
  583. data/doc/api/core/files/lib/facets/core/binding/op_store_rb.html +0 -97
  584. data/doc/api/core/files/lib/facets/core/binding/self/of_caller_rb.html +0 -96
  585. data/doc/api/core/files/lib/facets/core/binding/self_rb.html +0 -96
  586. data/doc/api/core/files/lib/facets/core/binding_rb.html +0 -109
  587. data/doc/api/core/files/lib/facets/core/class/by_name_rb.html +0 -96
  588. data/doc/api/core/files/lib/facets/core/class/cattr_accessor_rb.html +0 -100
  589. data/doc/api/core/files/lib/facets/core/class/cattr_rb.html +0 -92
  590. data/doc/api/core/files/lib/facets/core/class/cattr_reader_rb.html +0 -100
  591. data/doc/api/core/files/lib/facets/core/class/cattr_writer_rb.html +0 -100
  592. data/doc/api/core/files/lib/facets/core/class/descendents_rb.html +0 -92
  593. data/doc/api/core/files/lib/facets/core/class/method_name_rb.html +0 -92
  594. data/doc/api/core/files/lib/facets/core/class/remove_descendents_rb.html +0 -96
  595. data/doc/api/core/files/lib/facets/core/class/remove_subclasses_rb.html +0 -100
  596. data/doc/api/core/files/lib/facets/core/class/subclasses_rb.html +0 -100
  597. data/doc/api/core/files/lib/facets/core/class/to_proc_rb.html +0 -98
  598. data/doc/api/core/files/lib/facets/core/class/unix_path_rb.html +0 -92
  599. data/doc/api/core/files/lib/facets/core/comparable/at_least_rb.html +0 -92
  600. data/doc/api/core/files/lib/facets/core/comparable/at_most_rb.html +0 -100
  601. data/doc/api/core/files/lib/facets/core/comparable/cap_rb.html +0 -100
  602. data/doc/api/core/files/lib/facets/core/comparable/clip_rb.html +0 -92
  603. data/doc/api/core/files/lib/facets/core/comparable/cmp_rb.html +0 -92
  604. data/doc/api/core/files/lib/facets/core/config/datadir_rb.html +0 -92
  605. data/doc/api/core/files/lib/facets/core/continuation/self/create_rb.html +0 -148
  606. data/doc/api/core/files/lib/facets/core/date/days_in_month_rb.html +0 -96
  607. data/doc/api/core/files/lib/facets/core/date/days_of_month_rb.html +0 -96
  608. data/doc/api/core/files/lib/facets/core/date/stamp_rb.html +0 -96
  609. data/doc/api/core/files/lib/facets/core/date/to_date_rb.html +0 -96
  610. data/doc/api/core/files/lib/facets/core/date/to_s_rb.html +0 -96
  611. data/doc/api/core/files/lib/facets/core/date/to_time_rb.html +0 -96
  612. data/doc/api/core/files/lib/facets/core/dir/self/ancestor_rb.html +0 -92
  613. data/doc/api/core/files/lib/facets/core/dir/self/ascend_rb.html +0 -92
  614. data/doc/api/core/files/lib/facets/core/dir/self/descend_rb.html +0 -92
  615. data/doc/api/core/files/lib/facets/core/dir/self/ls_r_rb.html +0 -92
  616. data/doc/api/core/files/lib/facets/core/dir/self/recurse_rb.html +0 -100
  617. data/doc/api/core/files/lib/facets/core/enumerable/accumulate_rb.html +0 -96
  618. data/doc/api/core/files/lib/facets/core/enumerable/cascade_rb.html +0 -92
  619. data/doc/api/core/files/lib/facets/core/enumerable/collect_if_rb.html +0 -92
  620. data/doc/api/core/files/lib/facets/core/enumerable/collect_with_counter_rb.html +0 -100
  621. data/doc/api/core/files/lib/facets/core/enumerable/collect_with_index_rb.html +0 -92
  622. data/doc/api/core/files/lib/facets/core/enumerable/commonality_rb.html +0 -92
  623. data/doc/api/core/files/lib/facets/core/enumerable/compact_collect_rb.html +0 -96
  624. data/doc/api/core/files/lib/facets/core/enumerable/compact_map_rb.html +0 -100
  625. data/doc/api/core/files/lib/facets/core/enumerable/count_rb.html +0 -92
  626. data/doc/api/core/files/lib/facets/core/enumerable/cross_rb.html +0 -96
  627. data/doc/api/core/files/lib/facets/core/enumerable/each_by_rb.html +0 -100
  628. data/doc/api/core/files/lib/facets/core/enumerable/each_combination_rb.html +0 -92
  629. data/doc/api/core/files/lib/facets/core/enumerable/each_pair_rb.html +0 -92
  630. data/doc/api/core/files/lib/facets/core/enumerable/each_permutation_rb.html +0 -100
  631. data/doc/api/core/files/lib/facets/core/enumerable/each_slice_rb.html +0 -92
  632. data/doc/api/core/files/lib/facets/core/enumerable/each_unique_pair_rb.html +0 -96
  633. data/doc/api/core/files/lib/facets/core/enumerable/each_with_counter_rb.html +0 -92
  634. data/doc/api/core/files/lib/facets/core/enumerable/elementwise_rb.html +0 -100
  635. data/doc/api/core/files/lib/facets/core/enumerable/entropy_rb.html +0 -97
  636. data/doc/api/core/files/lib/facets/core/enumerable/every_rb.html +0 -96
  637. data/doc/api/core/files/lib/facets/core/enumerable/ew_rb.html +0 -96
  638. data/doc/api/core/files/lib/facets/core/enumerable/filter_collect_rb.html +0 -92
  639. data/doc/api/core/files/lib/facets/core/enumerable/filter_map_rb.html +0 -100
  640. data/doc/api/core/files/lib/facets/core/enumerable/find_collisions_rb.html +0 -96
  641. data/doc/api/core/files/lib/facets/core/enumerable/frequency_rb.html +0 -92
  642. data/doc/api/core/files/lib/facets/core/enumerable/graph_rb.html +0 -96
  643. data/doc/api/core/files/lib/facets/core/enumerable/ideal_entropy_rb.html +0 -92
  644. data/doc/api/core/files/lib/facets/core/enumerable/map_if_rb.html +0 -100
  645. data/doc/api/core/files/lib/facets/core/enumerable/map_with_counter_rb.html +0 -100
  646. data/doc/api/core/files/lib/facets/core/enumerable/map_with_index_rb.html +0 -100
  647. data/doc/api/core/files/lib/facets/core/enumerable/mode_rb.html +0 -92
  648. data/doc/api/core/files/lib/facets/core/enumerable/none_rb.html +0 -92
  649. data/doc/api/core/files/lib/facets/core/enumerable/nonuniq_rb.html +0 -92
  650. data/doc/api/core/files/lib/facets/core/enumerable/occur_rb.html +0 -92
  651. data/doc/api/core/files/lib/facets/core/enumerable/one_rb.html +0 -92
  652. data/doc/api/core/files/lib/facets/core/enumerable/op_pow_rb.html +0 -96
  653. data/doc/api/core/files/lib/facets/core/enumerable/partition_by_rb.html +0 -92
  654. data/doc/api/core/files/lib/facets/core/enumerable/permute_rb.html +0 -96
  655. data/doc/api/core/files/lib/facets/core/enumerable/probability_rb.html +0 -92
  656. data/doc/api/core/files/lib/facets/core/enumerable/project_rb.html +0 -92
  657. data/doc/api/core/files/lib/facets/core/enumerable/self/combinations_rb.html +0 -92
  658. data/doc/api/core/files/lib/facets/core/enumerable/self/cross_rb.html +0 -96
  659. data/doc/api/core/files/lib/facets/core/enumerable/to_h_rb.html +0 -92
  660. data/doc/api/core/files/lib/facets/core/enumerable/uniq_by_rb.html +0 -92
  661. data/doc/api/core/files/lib/facets/core/enumerable/where_rb.html +0 -92
  662. data/doc/api/core/files/lib/facets/core/file/self/append_rb.html +0 -96
  663. data/doc/api/core/files/lib/facets/core/file/self/create_rb.html +0 -92
  664. data/doc/api/core/files/lib/facets/core/file/self/open_as_string_rb.html +0 -118
  665. data/doc/api/core/files/lib/facets/core/file/self/read_binary_rb.html +0 -96
  666. data/doc/api/core/files/lib/facets/core/file/self/read_list_rb.html +0 -97
  667. data/doc/api/core/files/lib/facets/core/file/self/rootname_rb.html +0 -92
  668. data/doc/api/core/files/lib/facets/core/file/self/sanitize_rb.html +0 -96
  669. data/doc/api/core/files/lib/facets/core/file/self/split_all_rb.html +0 -101
  670. data/doc/api/core/files/lib/facets/core/file/self/write_rb.html +0 -96
  671. data/doc/api/core/files/lib/facets/core/fileutils/head_rb.html +0 -100
  672. data/doc/api/core/files/lib/facets/core/fileutils/safe_ln_rb.html +0 -96
  673. data/doc/api/core/files/lib/facets/core/fileutils/slice_rb.html +0 -96
  674. data/doc/api/core/files/lib/facets/core/fileutils/split_all_rb.html +0 -92
  675. data/doc/api/core/files/lib/facets/core/fileutils/tail_rb.html +0 -100
  676. data/doc/api/core/files/lib/facets/core/fileutils/wc_rb.html +0 -96
  677. data/doc/api/core/files/lib/facets/core/fileutils/whereis_rb.html +0 -96
  678. data/doc/api/core/files/lib/facets/core/fileutils/which_rb.html +0 -96
  679. data/doc/api/core/files/lib/facets/core/float/approx_rb.html +0 -100
  680. data/doc/api/core/files/lib/facets/core/float/round_at_rb.html +0 -96
  681. data/doc/api/core/files/lib/facets/core/float/round_off_rb.html +0 -92
  682. data/doc/api/core/files/lib/facets/core/float/round_to_rb.html +0 -96
  683. data/doc/api/core/files/lib/facets/core/gem/self/active_rb.html +0 -92
  684. data/doc/api/core/files/lib/facets/core/gem/self/gempath_rb.html +0 -96
  685. data/doc/api/core/files/lib/facets/core/gem/self/gemspec_rb.html +0 -96
  686. data/doc/api/core/files/lib/facets/core/hash/alias_rb.html +0 -92
  687. data/doc/api/core/files/lib/facets/core/hash/assert_has_keys_rb.html +0 -96
  688. data/doc/api/core/files/lib/facets/core/hash/assert_has_only_keys_rb.html +0 -96
  689. data/doc/api/core/files/lib/facets/core/hash/at_rb.html +0 -92
  690. data/doc/api/core/files/lib/facets/core/hash/collate_rb.html +0 -92
  691. data/doc/api/core/files/lib/facets/core/hash/delete_unless_rb.html +0 -96
  692. data/doc/api/core/files/lib/facets/core/hash/each_rb.html +0 -92
  693. data/doc/api/core/files/lib/facets/core/hash/each_with_index_rb.html +0 -97
  694. data/doc/api/core/files/lib/facets/core/hash/each_with_key_rb.html +0 -92
  695. data/doc/api/core/files/lib/facets/core/hash/graph_rb.html +0 -96
  696. data/doc/api/core/files/lib/facets/core/hash/has_keys_rb.html +0 -92
  697. data/doc/api/core/files/lib/facets/core/hash/has_only_keys_rb.html +0 -92
  698. data/doc/api/core/files/lib/facets/core/hash/inverse_rb.html +0 -92
  699. data/doc/api/core/files/lib/facets/core/hash/join_rb.html +0 -92
  700. data/doc/api/core/files/lib/facets/core/hash/keys_to_s_rb.html +0 -92
  701. data/doc/api/core/files/lib/facets/core/hash/keys_to_sym_rb.html +0 -92
  702. data/doc/api/core/files/lib/facets/core/hash/op_fetch_rb.html +0 -96
  703. data/doc/api/core/files/lib/facets/core/hash/op_lshift_rb.html +0 -92
  704. data/doc/api/core/files/lib/facets/core/hash/op_store_rb.html +0 -100
  705. data/doc/api/core/files/lib/facets/core/hash/rand_key_rb.html +0 -92
  706. data/doc/api/core/files/lib/facets/core/hash/rand_pair_rb.html +0 -96
  707. data/doc/api/core/files/lib/facets/core/hash/rand_value_rb.html +0 -96
  708. data/doc/api/core/files/lib/facets/core/hash/replace_each_rb.html +0 -92
  709. data/doc/api/core/files/lib/facets/core/hash/self/zipnew_rb.html +0 -92
  710. data/doc/api/core/files/lib/facets/core/hash/shuffle_rb.html +0 -96
  711. data/doc/api/core/files/lib/facets/core/hash/slice_rb.html +0 -92
  712. data/doc/api/core/files/lib/facets/core/hash/stringify_keys_rb.html +0 -100
  713. data/doc/api/core/files/lib/facets/core/hash/swap_rb.html +0 -92
  714. data/doc/api/core/files/lib/facets/core/hash/swapkey_rb.html +0 -92
  715. data/doc/api/core/files/lib/facets/core/hash/symoblize_keys_rb.html +0 -100
  716. data/doc/api/core/files/lib/facets/core/hash/to_h_rb.html +0 -92
  717. data/doc/api/core/files/lib/facets/core/hash/to_ostruct_rb.html +0 -96
  718. data/doc/api/core/files/lib/facets/core/hash/to_ostruct_recurse_rb.html +0 -97
  719. data/doc/api/core/files/lib/facets/core/hash/to_proc_rb.html +0 -92
  720. data/doc/api/core/files/lib/facets/core/hash/traverse_rb.html +0 -92
  721. data/doc/api/core/files/lib/facets/core/hash/update_each_rb.html +0 -92
  722. data/doc/api/core/files/lib/facets/core/hash/update_keys_rb.html +0 -92
  723. data/doc/api/core/files/lib/facets/core/hash/update_values_rb.html +0 -92
  724. data/doc/api/core/files/lib/facets/core/hash/variablize_keys_rb.html +0 -92
  725. data/doc/api/core/files/lib/facets/core/hash/weave_rb.html +0 -92
  726. data/doc/api/core/files/lib/facets/core/inflect_rb.html +0 -117
  727. data/doc/api/core/files/lib/facets/core/integer/even_rb.html +0 -100
  728. data/doc/api/core/files/lib/facets/core/integer/fac_rb.html +0 -100
  729. data/doc/api/core/files/lib/facets/core/integer/fact_rb.html +0 -100
  730. data/doc/api/core/files/lib/facets/core/integer/factorial_rb.html +0 -92
  731. data/doc/api/core/files/lib/facets/core/integer/multiple_rb.html +0 -92
  732. data/doc/api/core/files/lib/facets/core/integer/odd_rb.html +0 -100
  733. data/doc/api/core/files/lib/facets/core/integer/ordinal_rb.html +0 -92
  734. data/doc/api/core/files/lib/facets/core/integer/times_collect_rb.html +0 -92
  735. data/doc/api/core/files/lib/facets/core/integer/times_map_rb.html +0 -100
  736. data/doc/api/core/files/lib/facets/core/kernel/__DIR___rb.html +0 -92
  737. data/doc/api/core/files/lib/facets/core/kernel/__callee___rb.html +0 -100
  738. data/doc/api/core/files/lib/facets/core/kernel/__class___rb.html +0 -92
  739. data/doc/api/core/files/lib/facets/core/kernel/__get___rb.html +0 -92
  740. data/doc/api/core/files/lib/facets/core/kernel/__method___rb.html +0 -92
  741. data/doc/api/core/files/lib/facets/core/kernel/__self___rb.html +0 -96
  742. data/doc/api/core/files/lib/facets/core/kernel/__set___rb.html +0 -100
  743. data/doc/api/core/files/lib/facets/core/kernel/as_rb.html +0 -96
  744. data/doc/api/core/files/lib/facets/core/kernel/assign_from_rb.html +0 -96
  745. data/doc/api/core/files/lib/facets/core/kernel/assign_with_rb.html +0 -97
  746. data/doc/api/core/files/lib/facets/core/kernel/autoreload_files_rb.html +0 -100
  747. data/doc/api/core/files/lib/facets/core/kernel/autoreload_glob_rb.html +0 -100
  748. data/doc/api/core/files/lib/facets/core/kernel/autoreload_rb.html +0 -92
  749. data/doc/api/core/files/lib/facets/core/kernel/bool_rb.html +0 -92
  750. data/doc/api/core/files/lib/facets/core/kernel/bug_rb.html +0 -92
  751. data/doc/api/core/files/lib/facets/core/kernel/cache_rb.html +0 -92
  752. data/doc/api/core/files/lib/facets/core/kernel/call_stack_rb.html +0 -92
  753. data/doc/api/core/files/lib/facets/core/kernel/called_rb.html +0 -92
  754. data/doc/api/core/files/lib/facets/core/kernel/complete_rb.html +0 -92
  755. data/doc/api/core/files/lib/facets/core/kernel/constant_rb.html +0 -92
  756. data/doc/api/core/files/lib/facets/core/kernel/copy_rb.html +0 -92
  757. data/doc/api/core/files/lib/facets/core/kernel/deep_copy_rb.html +0 -92
  758. data/doc/api/core/files/lib/facets/core/kernel/demo_rb.html +0 -92
  759. data/doc/api/core/files/lib/facets/core/kernel/eigenclass_rb.html +0 -103
  760. data/doc/api/core/files/lib/facets/core/kernel/false_rb.html +0 -100
  761. data/doc/api/core/files/lib/facets/core/kernel/fn_rb.html +0 -92
  762. data/doc/api/core/files/lib/facets/core/kernel/generate_method_name_rb.html +0 -92
  763. data/doc/api/core/files/lib/facets/core/kernel/get_by_id_rb.html +0 -92
  764. data/doc/api/core/files/lib/facets/core/kernel/here_rb.html +0 -92
  765. data/doc/api/core/files/lib/facets/core/kernel/in_rb.html +0 -92
  766. data/doc/api/core/files/lib/facets/core/kernel/instance_assign_rb.html +0 -92
  767. data/doc/api/core/files/lib/facets/core/kernel/instvar_rb.html +0 -92
  768. data/doc/api/core/files/lib/facets/core/kernel/is_rb.html +0 -96
  769. data/doc/api/core/files/lib/facets/core/kernel/maybe_rb.html +0 -92
  770. data/doc/api/core/files/lib/facets/core/kernel/metaclass_rb.html +0 -92
  771. data/doc/api/core/files/lib/facets/core/kernel/method_rb.html +0 -92
  772. data/doc/api/core/files/lib/facets/core/kernel/methods_rb.html +0 -96
  773. data/doc/api/core/files/lib/facets/core/kernel/nack_rb.html +0 -98
  774. data/doc/api/core/files/lib/facets/core/kernel/new_rb.html +0 -92
  775. data/doc/api/core/files/lib/facets/core/kernel/object_class_rb.html +0 -92
  776. data/doc/api/core/files/lib/facets/core/kernel/object_hexid_rb.html +0 -92
  777. data/doc/api/core/files/lib/facets/core/kernel/op_esc_rb.html +0 -92
  778. data/doc/api/core/files/lib/facets/core/kernel/own_rb.html +0 -92
  779. data/doc/api/core/files/lib/facets/core/kernel/p_rb.html +0 -92
  780. data/doc/api/core/files/lib/facets/core/kernel/pp_exception_rb.html +0 -92
  781. data/doc/api/core/files/lib/facets/core/kernel/quaclass_rb.html +0 -92
  782. data/doc/api/core/files/lib/facets/core/kernel/require_all_rb.html +0 -92
  783. data/doc/api/core/files/lib/facets/core/kernel/require_esc_rb.html +0 -96
  784. data/doc/api/core/files/lib/facets/core/kernel/require_facet_rb.html +0 -96
  785. data/doc/api/core/files/lib/facets/core/kernel/require_local_rb.html +0 -92
  786. data/doc/api/core/files/lib/facets/core/kernel/resc_rb.html +0 -92
  787. data/doc/api/core/files/lib/facets/core/kernel/respond_rb.html +0 -92
  788. data/doc/api/core/files/lib/facets/core/kernel/returning_rb.html +0 -92
  789. data/doc/api/core/files/lib/facets/core/kernel/send_as_rb.html +0 -92
  790. data/doc/api/core/files/lib/facets/core/kernel/set_from_rb.html +0 -96
  791. data/doc/api/core/files/lib/facets/core/kernel/set_with_rb.html +0 -96
  792. data/doc/api/core/files/lib/facets/core/kernel/silence_warnings_rb.html +0 -100
  793. data/doc/api/core/files/lib/facets/core/kernel/silently_rb.html +0 -92
  794. data/doc/api/core/files/lib/facets/core/kernel/singleton_class_rb.html +0 -92
  795. data/doc/api/core/files/lib/facets/core/kernel/singleton_rb.html +0 -92
  796. data/doc/api/core/files/lib/facets/core/kernel/superior_rb.html +0 -92
  797. data/doc/api/core/files/lib/facets/core/kernel/supermethod_rb.html +0 -92
  798. data/doc/api/core/files/lib/facets/core/kernel/this_rb.html +0 -92
  799. data/doc/api/core/files/lib/facets/core/kernel/to_b_rb.html +0 -92
  800. data/doc/api/core/files/lib/facets/core/kernel/to_bool_rb.html +0 -92
  801. data/doc/api/core/files/lib/facets/core/kernel/true_rb.html +0 -100
  802. data/doc/api/core/files/lib/facets/core/kernel/unuri_rb.html +0 -100
  803. data/doc/api/core/files/lib/facets/core/kernel/uri_rb.html +0 -96
  804. data/doc/api/core/files/lib/facets/core/kernel/val_rb.html +0 -92
  805. data/doc/api/core/files/lib/facets/core/kernel/warn_with_line_rb.html +0 -92
  806. data/doc/api/core/files/lib/facets/core/kernel/with_accessor_rb.html +0 -92
  807. data/doc/api/core/files/lib/facets/core/kernel/with_reader_rb.html +0 -100
  808. data/doc/api/core/files/lib/facets/core/kernel/with_writer_rb.html +0 -100
  809. data/doc/api/core/files/lib/facets/core/logger/format_message_rb.html +0 -96
  810. data/doc/api/core/files/lib/facets/core/logger/format_rb.html +0 -96
  811. data/doc/api/core/files/lib/facets/core/matchdata/match_rb.html +0 -92
  812. data/doc/api/core/files/lib/facets/core/matchdata/matchset_rb.html +0 -100
  813. data/doc/api/core/files/lib/facets/core/matchdata/matchtree_rb.html +0 -92
  814. data/doc/api/core/files/lib/facets/core/module/abstract_rb.html +0 -105
  815. data/doc/api/core/files/lib/facets/core/module/alias_method_chain_rb.html +0 -92
  816. data/doc/api/core/files/lib/facets/core/module/alias_module_function_rb.html +0 -92
  817. data/doc/api/core/files/lib/facets/core/module/ancestor_rb.html +0 -92
  818. data/doc/api/core/files/lib/facets/core/module/attr_query_rb.html +0 -96
  819. data/doc/api/core/files/lib/facets/core/module/attr_rb.html +0 -92
  820. data/doc/api/core/files/lib/facets/core/module/attr_setter_rb.html +0 -92
  821. data/doc/api/core/files/lib/facets/core/module/attr_tester_rb.html +0 -96
  822. data/doc/api/core/files/lib/facets/core/module/attr_validator_rb.html +0 -92
  823. data/doc/api/core/files/lib/facets/core/module/basename_rb.html +0 -92
  824. data/doc/api/core/files/lib/facets/core/module/by_name_rb.html +0 -96
  825. data/doc/api/core/files/lib/facets/core/module/class_extension_rb.html +0 -124
  826. data/doc/api/core/files/lib/facets/core/module/class_rb.html +0 -92
  827. data/doc/api/core/files/lib/facets/core/module/clone_removing_rb.html +0 -100
  828. data/doc/api/core/files/lib/facets/core/module/clone_renaming_rb.html +0 -100
  829. data/doc/api/core/files/lib/facets/core/module/clone_using_rb.html +0 -92
  830. data/doc/api/core/files/lib/facets/core/module/dirname_rb.html +0 -92
  831. data/doc/api/core/files/lib/facets/core/module/equate_on_rb.html +0 -92
  832. data/doc/api/core/files/lib/facets/core/module/generate_instance_method_name_rb.html +0 -92
  833. data/doc/api/core/files/lib/facets/core/module/include_as_rb.html +0 -96
  834. data/doc/api/core/files/lib/facets/core/module/initializer_rb.html +0 -92
  835. data/doc/api/core/files/lib/facets/core/module/instance_methods_rb.html +0 -96
  836. data/doc/api/core/files/lib/facets/core/module/integrate_rb.html +0 -104
  837. data/doc/api/core/files/lib/facets/core/module/is_rb.html +0 -96
  838. data/doc/api/core/files/lib/facets/core/module/memoize_rb.html +0 -92
  839. data/doc/api/core/files/lib/facets/core/module/modspace_rb.html +0 -97
  840. data/doc/api/core/files/lib/facets/core/module/namespace_rb.html +0 -96
  841. data/doc/api/core/files/lib/facets/core/module/nesting_rb.html +0 -92
  842. data/doc/api/core/files/lib/facets/core/module/nodef_rb.html +0 -92
  843. data/doc/api/core/files/lib/facets/core/module/on_included_rb.html +0 -92
  844. data/doc/api/core/files/lib/facets/core/module/redef_rb.html +0 -96
  845. data/doc/api/core/files/lib/facets/core/module/redefine_method_rb.html +0 -92
  846. data/doc/api/core/files/lib/facets/core/module/redirect_method_rb.html +0 -92
  847. data/doc/api/core/files/lib/facets/core/module/redirect_rb.html +0 -96
  848. data/doc/api/core/files/lib/facets/core/module/remove_rb.html +0 -92
  849. data/doc/api/core/files/lib/facets/core/module/rename_method_rb.html +0 -92
  850. data/doc/api/core/files/lib/facets/core/module/rename_rb.html +0 -96
  851. data/doc/api/core/files/lib/facets/core/module/revisal_rb.html +0 -100
  852. data/doc/api/core/files/lib/facets/core/module/shadow_all_rb.html +0 -96
  853. data/doc/api/core/files/lib/facets/core/module/shadow_method_rb.html +0 -92
  854. data/doc/api/core/files/lib/facets/core/module/sort_on_rb.html +0 -92
  855. data/doc/api/core/files/lib/facets/core/module/this_rb.html +0 -96
  856. data/doc/api/core/files/lib/facets/core/module/wrap_method_rb.html +0 -92
  857. data/doc/api/core/files/lib/facets/core/module/wrap_rb.html +0 -96
  858. data/doc/api/core/files/lib/facets/core/nil_as_emptiness_rb.html +0 -116
  859. data/doc/api/core/files/lib/facets/core/nilclass/blank_rb.html +0 -92
  860. data/doc/api/core/files/lib/facets/core/nilclass/empty_rb.html +0 -92
  861. data/doc/api/core/files/lib/facets/core/nilclass/include_rb.html +0 -92
  862. data/doc/api/core/files/lib/facets/core/nilclass/length_rb.html +0 -100
  863. data/doc/api/core/files/lib/facets/core/nilclass/op_cmp_rb.html +0 -92
  864. data/doc/api/core/files/lib/facets/core/nilclass/op_fetch_rb.html +0 -92
  865. data/doc/api/core/files/lib/facets/core/nilclass/size_rb.html +0 -92
  866. data/doc/api/core/files/lib/facets/core/nilclass/status_rb.html +0 -92
  867. data/doc/api/core/files/lib/facets/core/nilclass/succ_rb.html +0 -92
  868. data/doc/api/core/files/lib/facets/core/nilclass/to_h_rb.html +0 -92
  869. data/doc/api/core/files/lib/facets/core/numeric/approx_rb.html +0 -92
  870. data/doc/api/core/files/lib/facets/core/numeric/ceil_multiple_rb.html +0 -92
  871. data/doc/api/core/files/lib/facets/core/numeric/pred_rb.html +0 -100
  872. data/doc/api/core/files/lib/facets/core/numeric/succ_rb.html +0 -92
  873. data/doc/api/core/files/lib/facets/core/numeric/to_b_rb.html +0 -92
  874. data/doc/api/core/files/lib/facets/core/ostruct/__merge___rb.html +0 -97
  875. data/doc/api/core/files/lib/facets/core/ostruct/__table___rb.html +0 -92
  876. data/doc/api/core/files/lib/facets/core/ostruct/__update___rb.html +0 -98
  877. data/doc/api/core/files/lib/facets/core/ostruct/instance_rb.html +0 -96
  878. data/doc/api/core/files/lib/facets/core/ostruct/op_fetch_rb.html +0 -96
  879. data/doc/api/core/files/lib/facets/core/ostruct/op_store_rb.html +0 -96
  880. data/doc/api/core/files/lib/facets/core/ostruct/to_h_rb.html +0 -92
  881. data/doc/api/core/files/lib/facets/core/ostruct_rb.html +0 -102
  882. data/doc/api/core/files/lib/facets/core/pathname/ascend_rb.html +0 -96
  883. data/doc/api/core/files/lib/facets/core/pathname/descend_rb.html +0 -96
  884. data/doc/api/core/files/lib/facets/core/proc/compose_rb.html +0 -92
  885. data/doc/api/core/files/lib/facets/core/proc/op_mul_rb.html +0 -100
  886. data/doc/api/core/files/lib/facets/core/proc/to_method_rb.html +0 -133
  887. data/doc/api/core/files/lib/facets/core/random_rb.html +0 -111
  888. data/doc/api/core/files/lib/facets/core/range/to_r_rb.html +0 -92
  889. data/doc/api/core/files/lib/facets/core/range/to_range_rb.html +0 -92
  890. data/doc/api/core/files/lib/facets/core/range/umbrella_rb.html +0 -92
  891. data/doc/api/core/files/lib/facets/core/range/within_rb.html +0 -96
  892. data/doc/api/core/files/lib/facets/core/regexp/arity_rb.html +0 -92
  893. data/doc/api/core/files/lib/facets/core/regexp/to_re_rb.html +0 -92
  894. data/doc/api/core/files/lib/facets/core/regexp/to_regexp_rb.html +0 -92
  895. data/doc/api/core/files/lib/facets/core/string/align_center_rb.html +0 -92
  896. data/doc/api/core/files/lib/facets/core/string/align_left_rb.html +0 -100
  897. data/doc/api/core/files/lib/facets/core/string/align_right_rb.html +0 -100
  898. data/doc/api/core/files/lib/facets/core/string/at_rand_rb.html +0 -98
  899. data/doc/api/core/files/lib/facets/core/string/at_rb.html +0 -92
  900. data/doc/api/core/files/lib/facets/core/string/basename_rb.html +0 -92
  901. data/doc/api/core/files/lib/facets/core/string/blank_rb.html +0 -92
  902. data/doc/api/core/files/lib/facets/core/string/bracket_rb.html +0 -92
  903. data/doc/api/core/files/lib/facets/core/string/brief_rb.html +0 -92
  904. data/doc/api/core/files/lib/facets/core/string/bytes_rb.html +0 -92
  905. data/doc/api/core/files/lib/facets/core/string/camelcase_rb.html +0 -92
  906. data/doc/api/core/files/lib/facets/core/string/camelize_rb.html +0 -92
  907. data/doc/api/core/files/lib/facets/core/string/capitalized_rb.html +0 -92
  908. data/doc/api/core/files/lib/facets/core/string/chars_rb.html +0 -92
  909. data/doc/api/core/files/lib/facets/core/string/cmp_rb.html +0 -92
  910. data/doc/api/core/files/lib/facets/core/string/demodulize_rb.html +0 -96
  911. data/doc/api/core/files/lib/facets/core/string/dequote_rb.html +0 -92
  912. data/doc/api/core/files/lib/facets/core/string/downcase_rb.html +0 -92
  913. data/doc/api/core/files/lib/facets/core/string/dresner_rb.html +0 -92
  914. data/doc/api/core/files/lib/facets/core/string/each_char_rb.html +0 -92
  915. data/doc/api/core/files/lib/facets/core/string/each_word_rb.html +0 -92
  916. data/doc/api/core/files/lib/facets/core/string/ends_with_rb.html +0 -100
  917. data/doc/api/core/files/lib/facets/core/string/first_char_rb.html +0 -96
  918. data/doc/api/core/files/lib/facets/core/string/first_rb.html +0 -98
  919. data/doc/api/core/files/lib/facets/core/string/fold_rb.html +0 -92
  920. data/doc/api/core/files/lib/facets/core/string/format_rb.html +0 -96
  921. data/doc/api/core/files/lib/facets/core/string/humanize_rb.html +0 -92
  922. data/doc/api/core/files/lib/facets/core/string/indent_rb.html +0 -92
  923. data/doc/api/core/files/lib/facets/core/string/index_all_rb.html +0 -92
  924. data/doc/api/core/files/lib/facets/core/string/last_char_rb.html +0 -96
  925. data/doc/api/core/files/lib/facets/core/string/last_rb.html +0 -98
  926. data/doc/api/core/files/lib/facets/core/string/line_wrap_rb.html +0 -92
  927. data/doc/api/core/files/lib/facets/core/string/lines_rb.html +0 -92
  928. data/doc/api/core/files/lib/facets/core/string/lowercase_rb.html +0 -96
  929. data/doc/api/core/files/lib/facets/core/string/margin_rb.html +0 -92
  930. data/doc/api/core/files/lib/facets/core/string/methodize_rb.html +0 -92
  931. data/doc/api/core/files/lib/facets/core/string/modulize_rb.html +0 -92
  932. data/doc/api/core/files/lib/facets/core/string/mscan_rb.html +0 -92
  933. data/doc/api/core/files/lib/facets/core/string/natcmp_rb.html +0 -92
  934. data/doc/api/core/files/lib/facets/core/string/nchar_rb.html +0 -92
  935. data/doc/api/core/files/lib/facets/core/string/ordinal_rb.html +0 -96
  936. data/doc/api/core/files/lib/facets/core/string/pathize_rb.html +0 -92
  937. data/doc/api/core/files/lib/facets/core/string/plural_rb.html +0 -100
  938. data/doc/api/core/files/lib/facets/core/string/pop_rb.html +0 -92
  939. data/doc/api/core/files/lib/facets/core/string/pot_rb.html +0 -92
  940. data/doc/api/core/files/lib/facets/core/string/pull_rb.html +0 -92
  941. data/doc/api/core/files/lib/facets/core/string/push_rb.html +0 -92
  942. data/doc/api/core/files/lib/facets/core/string/quote_rb.html +0 -96
  943. data/doc/api/core/files/lib/facets/core/string/rand_byte_rb.html +0 -92
  944. data/doc/api/core/files/lib/facets/core/string/rand_index_rb.html +0 -92
  945. data/doc/api/core/files/lib/facets/core/string/range_all_rb.html +0 -96
  946. data/doc/api/core/files/lib/facets/core/string/range_of_line_rb.html +0 -92
  947. data/doc/api/core/files/lib/facets/core/string/range_rb.html +0 -92
  948. data/doc/api/core/files/lib/facets/core/string/regesc_rb.html +0 -92
  949. data/doc/api/core/files/lib/facets/core/string/self/format_rb.html +0 -92
  950. data/doc/api/core/files/lib/facets/core/string/self/interpolate_rb.html +0 -92
  951. data/doc/api/core/files/lib/facets/core/string/self/patterns_rb.html +0 -92
  952. data/doc/api/core/files/lib/facets/core/string/self/rand_letter_rb.html +0 -92
  953. data/doc/api/core/files/lib/facets/core/string/self/random_rb.html +0 -99
  954. data/doc/api/core/files/lib/facets/core/string/shatter_rb.html +0 -92
  955. data/doc/api/core/files/lib/facets/core/string/shell_escape_rb.html +0 -92
  956. data/doc/api/core/files/lib/facets/core/string/shift_rb.html +0 -92
  957. data/doc/api/core/files/lib/facets/core/string/shuffle_rb.html +0 -96
  958. data/doc/api/core/files/lib/facets/core/string/similarity_rb.html +0 -92
  959. data/doc/api/core/files/lib/facets/core/string/singular_rb.html +0 -92
  960. data/doc/api/core/files/lib/facets/core/string/soundex_rb.html +0 -92
  961. data/doc/api/core/files/lib/facets/core/string/starts_with_rb.html +0 -92
  962. data/doc/api/core/files/lib/facets/core/string/succ_rb.html +0 -92
  963. data/doc/api/core/files/lib/facets/core/string/tab_rb.html +0 -100
  964. data/doc/api/core/files/lib/facets/core/string/tabto_rb.html +0 -100
  965. data/doc/api/core/files/lib/facets/core/string/to_a_rb.html +0 -92
  966. data/doc/api/core/files/lib/facets/core/string/to_b_rb.html +0 -92
  967. data/doc/api/core/files/lib/facets/core/string/to_const_rb.html +0 -92
  968. data/doc/api/core/files/lib/facets/core/string/to_date_rb.html +0 -97
  969. data/doc/api/core/files/lib/facets/core/string/to_proc_rb.html +0 -92
  970. data/doc/api/core/files/lib/facets/core/string/to_re_rb.html +0 -92
  971. data/doc/api/core/files/lib/facets/core/string/to_rx_rb.html +0 -100
  972. data/doc/api/core/files/lib/facets/core/string/to_time_rb.html +0 -96
  973. data/doc/api/core/files/lib/facets/core/string/unbracket_rb.html +0 -96
  974. data/doc/api/core/files/lib/facets/core/string/underscore_rb.html +0 -92
  975. data/doc/api/core/files/lib/facets/core/string/unix_crypt_rb.html +0 -96
  976. data/doc/api/core/files/lib/facets/core/string/unpack_rb.html +0 -92
  977. data/doc/api/core/files/lib/facets/core/string/unshift_rb.html +0 -92
  978. data/doc/api/core/files/lib/facets/core/string/upcase_rb.html +0 -92
  979. data/doc/api/core/files/lib/facets/core/string/uppercase_rb.html +0 -100
  980. data/doc/api/core/files/lib/facets/core/string/whitespace_rb.html +0 -96
  981. data/doc/api/core/files/lib/facets/core/string/word_filter_rb.html +0 -92
  982. data/doc/api/core/files/lib/facets/core/string/word_wrap_rb.html +0 -92
  983. data/doc/api/core/files/lib/facets/core/string/words_rb.html +0 -92
  984. data/doc/api/core/files/lib/facets/core/string_as_array_rb.html +0 -109
  985. data/doc/api/core/files/lib/facets/core/symbol/camelcase_rb.html +0 -96
  986. data/doc/api/core/files/lib/facets/core/symbol/camelize_rb.html +0 -96
  987. data/doc/api/core/files/lib/facets/core/symbol/capitalize_rb.html +0 -96
  988. data/doc/api/core/files/lib/facets/core/symbol/capitalized_rb.html +0 -97
  989. data/doc/api/core/files/lib/facets/core/symbol/downcase_rb.html +0 -96
  990. data/doc/api/core/files/lib/facets/core/symbol/not_rb.html +0 -92
  991. data/doc/api/core/files/lib/facets/core/symbol/pad_rb.html +0 -92
  992. data/doc/api/core/files/lib/facets/core/symbol/succ_rb.html +0 -92
  993. data/doc/api/core/files/lib/facets/core/symbol/to_const_rb.html +0 -96
  994. data/doc/api/core/files/lib/facets/core/symbol/to_proc_rb.html +0 -92
  995. data/doc/api/core/files/lib/facets/core/symbol/to_str_rb.html +0 -92
  996. data/doc/api/core/files/lib/facets/core/symbol/underscore_rb.html +0 -96
  997. data/doc/api/core/files/lib/facets/core/symbol/upcase_rb.html +0 -96
  998. data/doc/api/core/files/lib/facets/core/time/change_rb.html +0 -92
  999. data/doc/api/core/files/lib/facets/core/time/elapse_rb.html +0 -92
  1000. data/doc/api/core/files/lib/facets/core/time/self/days_extrema_rb.html +0 -114
  1001. data/doc/api/core/files/lib/facets/core/time/self/stamp_rb.html +0 -100
  1002. data/doc/api/core/files/lib/facets/core/time/stamp_rb.html +0 -92
  1003. data/doc/api/core/files/lib/facets/core/time/to_date_rb.html +0 -96
  1004. data/doc/api/core/files/lib/facets/core/time/to_s_rb.html +0 -96
  1005. data/doc/api/core/files/lib/facets/core/time/to_time_rb.html +0 -92
  1006. data/doc/api/core/files/lib/facets/core/unboundmethod/name_rb.html +0 -92
  1007. data/doc/api/core/fr_class_index.html +0 -81
  1008. data/doc/api/core/fr_file_index.html +0 -521
  1009. data/doc/api/core/fr_method_index.html +0 -559
  1010. data/doc/api/core/index.html +0 -26
  1011. data/doc/api/core/rdoc-style.css +0 -175
  1012. data/doc/api/more/classes/Annotation.html +0 -258
  1013. data/doc/api/more/classes/Array.html +0 -363
  1014. data/doc/api/more/classes/Aspect.html +0 -159
  1015. data/doc/api/more/classes/Aspects.html +0 -240
  1016. data/doc/api/more/classes/Aspects/ClassMethods.html +0 -254
  1017. data/doc/api/more/classes/Association.html +0 -289
  1018. data/doc/api/more/classes/BBCode.html +0 -531
  1019. data/doc/api/more/classes/BasicObject.html +0 -281
  1020. data/doc/api/more/classes/BasicObject/Self.html +0 -143
  1021. data/doc/api/more/classes/BinaryReader.html +0 -535
  1022. data/doc/api/more/classes/BinaryReader/ByteOrder.html +0 -225
  1023. data/doc/api/more/classes/BuilderObject.html +0 -248
  1024. data/doc/api/more/classes/Class.html +0 -200
  1025. data/doc/api/more/classes/Client.html +0 -1251
  1026. data/doc/api/more/classes/Cloneable.html +0 -133
  1027. data/doc/api/more/classes/Console.html +0 -105
  1028. data/doc/api/more/classes/Console/ANSICode.html +0 -488
  1029. data/doc/api/more/classes/Console/Command.html +0 -286
  1030. data/doc/api/more/classes/Console/ProgressBar.html +0 -640
  1031. data/doc/api/more/classes/Coroutine.html +0 -284
  1032. data/doc/api/more/classes/Crypt.html +0 -270
  1033. data/doc/api/more/classes/DebugSocket.html +0 -242
  1034. data/doc/api/more/classes/Dictionary.html +0 -974
  1035. data/doc/api/more/classes/Downloader.html +0 -515
  1036. data/doc/api/more/classes/Downloader/Checksum.html +0 -96
  1037. data/doc/api/more/classes/Downloader/Mirror.html +0 -134
  1038. data/doc/api/more/classes/Elementor.html +0 -202
  1039. data/doc/api/more/classes/Enumerable.html +0 -86
  1040. data/doc/api/more/classes/EnumerablePass.html +0 -217
  1041. data/doc/api/more/classes/Expirable.html +0 -197
  1042. data/doc/api/more/classes/FalseClass.html +0 -119
  1043. data/doc/api/more/classes/FileList.html +0 -971
  1044. data/doc/api/more/classes/Float.html +0 -141
  1045. data/doc/api/more/classes/FloatString.html +0 -413
  1046. data/doc/api/more/classes/Functor.html +0 -224
  1047. data/doc/api/more/classes/HTMLBuilder.html +0 -132
  1048. data/doc/api/more/classes/HTMLHelper.html +0 -189
  1049. data/doc/api/more/classes/HTTP.html +0 -154
  1050. data/doc/api/more/classes/HTTP/BadResponseError.html +0 -94
  1051. data/doc/api/more/classes/HTTP/Error.html +0 -96
  1052. data/doc/api/more/classes/HTTP/Message.html +0 -633
  1053. data/doc/api/more/classes/HTTP/Message/Body.html +0 -299
  1054. data/doc/api/more/classes/HTTP/Message/Headers.html +0 -641
  1055. data/doc/api/more/classes/HTTP/Status.html +0 -148
  1056. data/doc/api/more/classes/HTTPAccess.html +0 -115
  1057. data/doc/api/more/classes/Hash.html +0 -257
  1058. data/doc/api/more/classes/HashBuilder.html +0 -216
  1059. data/doc/api/more/classes/Heap.html +0 -535
  1060. data/doc/api/more/classes/Heap/EmptyHeapException.html +0 -92
  1061. data/doc/api/more/classes/Heap/Max.html +0 -133
  1062. data/doc/api/more/classes/Heap/Min.html +0 -133
  1063. data/doc/api/more/classes/IORedirect.html +0 -224
  1064. data/doc/api/more/classes/Integer.html +0 -299
  1065. data/doc/api/more/classes/Interval.html +0 -853
  1066. data/doc/api/more/classes/InvalidNackError.html +0 -117
  1067. data/doc/api/more/classes/JSON.html +0 -410
  1068. data/doc/api/more/classes/JSON/Parser.html +0 -374
  1069. data/doc/api/more/classes/JSON/State.html +0 -280
  1070. data/doc/api/more/classes/Kernel.html +0 -400
  1071. data/doc/api/more/classes/LRUCache.html +0 -461
  1072. data/doc/api/more/classes/LRUCache/Item.html +0 -114
  1073. data/doc/api/more/classes/LRUCache/Sentinel.html +0 -102
  1074. data/doc/api/more/classes/Lazy.html +0 -96
  1075. data/doc/api/more/classes/Lazy/Future.html +0 -100
  1076. data/doc/api/more/classes/Lazy/Promise.html +0 -114
  1077. data/doc/api/more/classes/Lazy/PromiseSafe.html +0 -99
  1078. data/doc/api/more/classes/Lisp.html +0 -846
  1079. data/doc/api/more/classes/Lisp/DottedPair.html +0 -289
  1080. data/doc/api/more/classes/Lisp/Format.html +0 -147
  1081. data/doc/api/more/classes/Math.html +0 -110
  1082. data/doc/api/more/classes/Math/Constants.html +0 -691
  1083. data/doc/api/more/classes/Math/Constants/CGS.html +0 -584
  1084. data/doc/api/more/classes/Method.html +0 -170
  1085. data/doc/api/more/classes/Method/Probe.html +0 -267
  1086. data/doc/api/more/classes/Mock.html +0 -276
  1087. data/doc/api/more/classes/Module.html +0 -599
  1088. data/doc/api/more/classes/Multiton.html +0 -256
  1089. data/doc/api/more/classes/NackClass.html +0 -245
  1090. data/doc/api/more/classes/NilClass.html +0 -238
  1091. data/doc/api/more/classes/NullClass.html +0 -202
  1092. data/doc/api/more/classes/Numeric.html +0 -1104
  1093. data/doc/api/more/classes/ORMSupport.html +0 -357
  1094. data/doc/api/more/classes/Object.html +0 -328
  1095. data/doc/api/more/classes/OpenCascade.html +0 -230
  1096. data/doc/api/more/classes/OpenObject.html +0 -552
  1097. data/doc/api/more/classes/PQueue.html +0 -471
  1098. data/doc/api/more/classes/PathList.html +0 -162
  1099. data/doc/api/more/classes/PathList/Finder.html +0 -137
  1100. data/doc/api/more/classes/Pool.html +0 -207
  1101. data/doc/api/more/classes/Proc.html +0 -140
  1102. data/doc/api/more/classes/PromoteSelf.html +0 -138
  1103. data/doc/api/more/classes/Quaternion.html +0 -1497
  1104. data/doc/api/more/classes/REXMLBuilder.html +0 -357
  1105. data/doc/api/more/classes/REXMLBuilder/REXMLUtil.html +0 -396
  1106. data/doc/api/more/classes/Recorder.html +0 -208
  1107. data/doc/api/more/classes/Reference.html +0 -201
  1108. data/doc/api/more/classes/RubyOneLiners.html +0 -139
  1109. data/doc/api/more/classes/RubyTals.html +0 -316
  1110. data/doc/api/more/classes/SSLSocketWrap.html +0 -410
  1111. data/doc/api/more/classes/Semaphore.html +0 -264
  1112. data/doc/api/more/classes/SimpleStringIO.html +0 -139
  1113. data/doc/api/more/classes/Snapshot.html +0 -191
  1114. data/doc/api/more/classes/StateMachine.html +0 -248
  1115. data/doc/api/more/classes/StateParser.html +0 -276
  1116. data/doc/api/more/classes/StateParser/Constants.html +0 -109
  1117. data/doc/api/more/classes/StateParser/Marker.html +0 -269
  1118. data/doc/api/more/classes/StateParser/State.html +0 -448
  1119. data/doc/api/more/classes/StaticHash.html +0 -144
  1120. data/doc/api/more/classes/String.html +0 -300
  1121. data/doc/api/more/classes/Struct.html +0 -134
  1122. data/doc/api/more/classes/Symbol.html +0 -118
  1123. data/doc/api/more/classes/SyncArray.html +0 -131
  1124. data/doc/api/more/classes/SyncHash.html +0 -135
  1125. data/doc/api/more/classes/SyncHash/Delegator.html +0 -213
  1126. data/doc/api/more/classes/SyncHash/Inheritor.html +0 -213
  1127. data/doc/api/more/classes/System.html +0 -1055
  1128. data/doc/api/more/classes/TSort.html +0 -123
  1129. data/doc/api/more/classes/TagIterator.html +0 -706
  1130. data/doc/api/more/classes/Task.html +0 -237
  1131. data/doc/api/more/classes/Task/Graph.html +0 -165
  1132. data/doc/api/more/classes/Taskable.html +0 -300
  1133. data/doc/api/more/classes/Time.html +0 -746
  1134. data/doc/api/more/classes/Timer.html +0 -471
  1135. data/doc/api/more/classes/Timer/Dummy.html +0 -141
  1136. data/doc/api/more/classes/TracePoint.html +0 -456
  1137. data/doc/api/more/classes/TrueClass.html +0 -118
  1138. data/doc/api/more/classes/Tuple.html +0 -907
  1139. data/doc/api/more/classes/TypeCastException.html +0 -163
  1140. data/doc/api/more/classes/Uninheritable.html +0 -130
  1141. data/doc/api/more/classes/Units.html +0 -191
  1142. data/doc/api/more/classes/Units/Config.html +0 -120
  1143. data/doc/api/more/classes/Units/Converter.html +0 -808
  1144. data/doc/api/more/classes/Units/Converter/ExchangeRate.html +0 -155
  1145. data/doc/api/more/classes/Units/Converter/ExchangeRate/CachedXMethods.html +0 -143
  1146. data/doc/api/more/classes/Units/Converter/ExchangeRate/XMethods.html +0 -197
  1147. data/doc/api/more/classes/Units/Unit.html +0 -434
  1148. data/doc/api/more/classes/Units/Value.html +0 -331
  1149. data/doc/api/more/classes/ValueHolder.html +0 -167
  1150. data/doc/api/more/classes/Web.html +0 -103
  1151. data/doc/api/more/classes/Web/Cookie.html +0 -560
  1152. data/doc/api/more/classes/Web/CookieManager.html +0 -567
  1153. data/doc/api/more/classes/Web/CookieManager/Error.html +0 -96
  1154. data/doc/api/more/classes/Web/CookieManager/ErrorOverrideOK.html +0 -94
  1155. data/doc/api/more/classes/Web/CookieManager/NoDotError.html +0 -94
  1156. data/doc/api/more/classes/Web/CookieManager/SpecialError.html +0 -94
  1157. data/doc/api/more/classes/Web/CookieUtils.html +0 -179
  1158. data/doc/api/more/classes/XMLBuilder.html +0 -132
  1159. data/doc/api/more/classes/XMLHelper.html +0 -428
  1160. data/doc/api/more/classes/XOXO.html +0 -251
  1161. data/doc/api/more/classes/YAMLStruct.html +0 -166
  1162. data/doc/api/more/created.rid +0 -1
  1163. data/doc/api/more/files/COPYING.html +0 -517
  1164. data/doc/api/more/files/README.html +0 -389
  1165. data/doc/api/more/files/lib/facets/more/annattr_rb.html +0 -116
  1166. data/doc/api/more/files/lib/facets/more/annotation_rb.html +0 -117
  1167. data/doc/api/more/files/lib/facets/more/ansicode_rb.html +0 -128
  1168. data/doc/api/more/files/lib/facets/more/aspects_rb.html +0 -115
  1169. data/doc/api/more/files/lib/facets/more/association_rb.html +0 -111
  1170. data/doc/api/more/files/lib/facets/more/basicobject_rb.html +0 -129
  1171. data/doc/api/more/files/lib/facets/more/bbcode_rb.html +0 -111
  1172. data/doc/api/more/files/lib/facets/more/binaryreader_rb.html +0 -111
  1173. data/doc/api/more/files/lib/facets/more/bitmask_rb.html +0 -111
  1174. data/doc/api/more/files/lib/facets/more/blankslate_rb.html +0 -113
  1175. data/doc/api/more/files/lib/facets/more/builderobject_rb.html +0 -115
  1176. data/doc/api/more/files/lib/facets/more/bytes_rb.html +0 -131
  1177. data/doc/api/more/files/lib/facets/more/classmethods_rb.html +0 -121
  1178. data/doc/api/more/files/lib/facets/more/cloneable_rb.html +0 -132
  1179. data/doc/api/more/files/lib/facets/more/command_rb.html +0 -119
  1180. data/doc/api/more/files/lib/facets/more/cookie_rb.html +0 -136
  1181. data/doc/api/more/files/lib/facets/more/coroutine_rb.html +0 -111
  1182. data/doc/api/more/files/lib/facets/more/crypt_rb.html +0 -146
  1183. data/doc/api/more/files/lib/facets/more/dictionary_rb.html +0 -123
  1184. data/doc/api/more/files/lib/facets/more/downloader_rb.html +0 -124
  1185. data/doc/api/more/files/lib/facets/more/elementor_rb.html +0 -115
  1186. data/doc/api/more/files/lib/facets/more/enumerablepass_rb.html +0 -115
  1187. data/doc/api/more/files/lib/facets/more/expirable_rb.html +0 -111
  1188. data/doc/api/more/files/lib/facets/more/filelist_rb.html +0 -128
  1189. data/doc/api/more/files/lib/facets/more/floatstring_rb.html +0 -115
  1190. data/doc/api/more/files/lib/facets/more/functor_rb.html +0 -116
  1191. data/doc/api/more/files/lib/facets/more/hashbuilder_rb.html +0 -115
  1192. data/doc/api/more/files/lib/facets/more/heap_rb.html +0 -131
  1193. data/doc/api/more/files/lib/facets/more/htmlbuilder_rb.html +0 -116
  1194. data/doc/api/more/files/lib/facets/more/htmlhelper_rb.html +0 -119
  1195. data/doc/api/more/files/lib/facets/more/http_rb.html +0 -116
  1196. data/doc/api/more/files/lib/facets/more/httpaccess_rb.html +0 -137
  1197. data/doc/api/more/files/lib/facets/more/inheritor_rb.html +0 -115
  1198. data/doc/api/more/files/lib/facets/more/interval_rb.html +0 -120
  1199. data/doc/api/more/files/lib/facets/more/ioredirect_rb.html +0 -116
  1200. data/doc/api/more/files/lib/facets/more/json_rb.html +0 -141
  1201. data/doc/api/more/files/lib/facets/more/lazy_rb.html +0 -111
  1202. data/doc/api/more/files/lib/facets/more/lisp_format_rb.html +0 -129
  1203. data/doc/api/more/files/lib/facets/more/lisp_rb.html +0 -119
  1204. data/doc/api/more/files/lib/facets/more/lrucache_rb.html +0 -111
  1205. data/doc/api/more/files/lib/facets/more/mathconstants_rb.html +0 -121
  1206. data/doc/api/more/files/lib/facets/more/methodprobe_rb.html +0 -111
  1207. data/doc/api/more/files/lib/facets/more/mock_rb.html +0 -208
  1208. data/doc/api/more/files/lib/facets/more/multipliers_rb.html +0 -115
  1209. data/doc/api/more/files/lib/facets/more/multiton_rb.html +0 -114
  1210. data/doc/api/more/files/lib/facets/more/nackclass_rb.html +0 -151
  1211. data/doc/api/more/files/lib/facets/more/nilcomparable_rb.html +0 -118
  1212. data/doc/api/more/files/lib/facets/more/nullclass_rb.html +0 -111
  1213. data/doc/api/more/files/lib/facets/more/one_rb.html +0 -158
  1214. data/doc/api/more/files/lib/facets/more/opencascade_rb.html +0 -129
  1215. data/doc/api/more/files/lib/facets/more/openobject_rb.html +0 -120
  1216. data/doc/api/more/files/lib/facets/more/orderedhash_rb.html +0 -113
  1217. data/doc/api/more/files/lib/facets/more/ormsupport_rb.html +0 -125
  1218. data/doc/api/more/files/lib/facets/more/overload_rb.html +0 -111
  1219. data/doc/api/more/files/lib/facets/more/paramix_rb.html +0 -118
  1220. data/doc/api/more/files/lib/facets/more/pathlist_rb.html +0 -111
  1221. data/doc/api/more/files/lib/facets/more/pool_rb.html +0 -120
  1222. data/doc/api/more/files/lib/facets/more/pqueue_rb.html +0 -122
  1223. data/doc/api/more/files/lib/facets/more/preinitialize_rb.html +0 -115
  1224. data/doc/api/more/files/lib/facets/more/progressbar_rb.html +0 -111
  1225. data/doc/api/more/files/lib/facets/more/promoteself_rb.html +0 -111
  1226. data/doc/api/more/files/lib/facets/more/quaternion_rb.html +0 -150
  1227. data/doc/api/more/files/lib/facets/more/recorder_rb.html +0 -115
  1228. data/doc/api/more/files/lib/facets/more/reference_rb.html +0 -115
  1229. data/doc/api/more/files/lib/facets/more/rexmlbuilder_rb.html +0 -116
  1230. data/doc/api/more/files/lib/facets/more/rtals_rb.html +0 -115
  1231. data/doc/api/more/files/lib/facets/more/semaphore_rb.html +0 -111
  1232. data/doc/api/more/files/lib/facets/more/snapshot_rb.html +0 -121
  1233. data/doc/api/more/files/lib/facets/more/stateparser_rb.html +0 -115
  1234. data/doc/api/more/files/lib/facets/more/statichash_rb.html +0 -133
  1235. data/doc/api/more/files/lib/facets/more/syncarray_rb.html +0 -115
  1236. data/doc/api/more/files/lib/facets/more/synchash_rb.html +0 -115
  1237. data/doc/api/more/files/lib/facets/more/system_rb.html +0 -123
  1238. data/doc/api/more/files/lib/facets/more/tagiterator_rb.html +0 -111
  1239. data/doc/api/more/files/lib/facets/more/taskable_rb.html +0 -118
  1240. data/doc/api/more/files/lib/facets/more/timer_rb.html +0 -127
  1241. data/doc/api/more/files/lib/facets/more/times_rb.html +0 -127
  1242. data/doc/api/more/files/lib/facets/more/tracepoint_rb.html +0 -131
  1243. data/doc/api/more/files/lib/facets/more/tuple_rb.html +0 -122
  1244. data/doc/api/more/files/lib/facets/more/typecast_rb.html +0 -133
  1245. data/doc/api/more/files/lib/facets/more/uninheritable_rb.html +0 -111
  1246. data/doc/api/more/files/lib/facets/more/units_rb.html +0 -118
  1247. data/doc/api/more/files/lib/facets/more/xmlbuilder_rb.html +0 -116
  1248. data/doc/api/more/files/lib/facets/more/xmlhelper_rb.html +0 -111
  1249. data/doc/api/more/files/lib/facets/more/xoxo_rb.html +0 -125
  1250. data/doc/api/more/files/lib/facets/more/yamlstruct_rb.html +0 -123
  1251. data/doc/api/more/fr_class_index.html +0 -196
  1252. data/doc/api/more/fr_file_index.html +0 -133
  1253. data/doc/api/more/fr_method_index.html +0 -1284
  1254. data/doc/api/more/index.html +0 -26
  1255. data/doc/api/more/rdoc-style.css +0 -175
  1256. data/doc/web/documentation.html +0 -174
  1257. data/doc/web/images/abc.png +0 -0
  1258. data/doc/web/images/abc1.png +0 -0
  1259. data/doc/web/images/apple_core.jpg +0 -0
  1260. data/doc/web/images/apples3.jpg +0 -0
  1261. data/doc/web/images/core.jpg +0 -0
  1262. data/doc/web/images/favicon.ico +0 -0
  1263. data/doc/web/images/gray.jpg +0 -0
  1264. data/doc/web/images/ruby-lg.png +0 -0
  1265. data/doc/web/images/ruby.gif +0 -0
  1266. data/doc/web/images/three_apples.jpg +0 -0
  1267. data/doc/web/images/yellow_fade.jpg +0 -0
  1268. data/doc/web/images/yellow_fade2.jpg +0 -0
  1269. data/doc/web/index.html +0 -224
  1270. data/doc/web/style.css +0 -153
  1271. data/lib/facet/blankslate.rb +0 -1
  1272. data/lib/facet/hash/symoblize_keys.rb +0 -1
  1273. data/lib/facet/kernel/generate_method_name.rb +0 -1
  1274. data/lib/facet/module/generate_instance_method_name.rb +0 -1
  1275. data/lib/facets/core/hash/symoblize_keys.rb +0 -2
  1276. data/lib/facets/core/kernel/generate_method_name.rb +0 -39
  1277. data/lib/facets/core/module/generate_instance_method_name.rb +0 -47
  1278. data/lib/facets/more/blankslate.rb +0 -7
  1279. data/proj/calibre/ProjectInfo.annotation +0 -46
  1280. data/proj/calibre/ProjectInfo.ansicode +0 -33
  1281. data/proj/calibre/ProjectInfo.asociation +0 -34
  1282. data/proj/calibre/ProjectInfo.basicobject +0 -36
  1283. data/proj/calibre/ProjectInfo.bbcode +0 -34
  1284. data/proj/calibre/ProjectInfo.binaryreader +0 -35
  1285. data/proj/calibre/ProjectInfo.bitmask +0 -33
  1286. data/proj/calibre/ProjectInfo.classinherit +0 -36
  1287. data/proj/calibre/ProjectInfo.classmethods +0 -36
  1288. data/proj/calibre/ProjectInfo.cloneable +0 -33
  1289. data/proj/calibre/ProjectInfo.consoleapp +0 -35
  1290. data/proj/calibre/ProjectInfo.coroutine +0 -37
  1291. data/proj/calibre/ProjectInfo.crypt +0 -33
  1292. data/proj/calibre/ProjectInfo.dictionary +0 -40
  1293. data/proj/calibre/ProjectInfo.downloader +0 -39
  1294. data/proj/calibre/ProjectInfo.enumerablepass +0 -35
  1295. data/proj/calibre/ProjectInfo.expirable +0 -37
  1296. data/proj/calibre/ProjectInfo.floatstring +0 -35
  1297. data/proj/calibre/ProjectInfo.functor +0 -40
  1298. data/proj/calibre/ProjectInfo.heap +0 -33
  1299. data/proj/calibre/ProjectInfo.inheritor +0 -36
  1300. data/proj/calibre/ProjectInfo.interval +0 -36
  1301. data/proj/calibre/ProjectInfo.lisp +0 -38
  1302. data/proj/calibre/ProjectInfo.lrucache +0 -34
  1303. data/proj/calibre/ProjectInfo.mathconstants +0 -41
  1304. data/proj/calibre/ProjectInfo.methodprobe +0 -38
  1305. data/proj/calibre/ProjectInfo.mock +0 -34
  1306. data/proj/calibre/ProjectInfo.multiton +0 -36
  1307. data/proj/calibre/ProjectInfo.nackclass +0 -33
  1308. data/proj/calibre/ProjectInfo.nilcomparable +0 -35
  1309. data/proj/calibre/ProjectInfo.nullclass +0 -35
  1310. data/proj/calibre/ProjectInfo.one +0 -37
  1311. data/proj/calibre/ProjectInfo.openobject +0 -39
  1312. data/proj/calibre/ProjectInfo.paramix +0 -38
  1313. data/proj/calibre/ProjectInfo.pool +0 -33
  1314. data/proj/calibre/ProjectInfo.progressbar +0 -37
  1315. data/proj/calibre/ProjectInfo.reference +0 -36
  1316. data/proj/calibre/ProjectInfo.semaphore +0 -36
  1317. data/proj/calibre/ProjectInfo.stateparser +0 -39
  1318. data/proj/calibre/ProjectInfo.statichash +0 -33
  1319. data/proj/calibre/ProjectInfo.system +0 -34
  1320. data/proj/calibre/ProjectInfo.tagiterator +0 -36
  1321. data/proj/calibre/ProjectInfo.timer +0 -35
  1322. data/proj/calibre/ProjectInfo.tracepoint +0 -37
  1323. data/proj/calibre/ProjectInfo.tuple +0 -36
  1324. data/proj/calibre/ProjectInfo.uniheritable +0 -34
  1325. data/proj/calibre/ProjectInfo.units +0 -34
  1326. data/proj/calibre/ProjectInfo.yamlstruct +0 -34
  1327. data/proj/info +0 -117
  1328. data/proj/metadata +0 -36
  1329. data/proj/tasks/calibre.rb +0 -15
  1330. data/snip/ProjectInfo +0 -115
  1331. data/snip/README +0 -13
  1332. data/snip/TODO +0 -73
  1333. data/snip/autorequire.rb +0 -83
  1334. data/snip/core/array/at_rand.rb +0 -95
  1335. data/snip/core/array/each_slice.rb +0 -23
  1336. data/snip/core/array/pick_values.rb +0 -32
  1337. data/snip/core/array/rand_indexes.rb +0 -33
  1338. data/snip/core/binding/class.rb +0 -11
  1339. data/snip/core/binding/delegate-binding.rb +0 -19
  1340. data/snip/core/binding/delegate.rb +0 -15
  1341. data/snip/core/binding/proc.rb +0 -6
  1342. data/snip/core/class/to_module.rb +0 -3
  1343. data/snip/core/enumerable/op_fetch.rb +0 -30
  1344. data/snip/core/fileutils/nl_convert.rb +0 -133
  1345. data/snip/core/io/expect.rb +0 -127
  1346. data/snip/core/kernel/__clone__.rb +0 -4
  1347. data/snip/core/kernel/__dup__.rb +0 -4
  1348. data/snip/core/kernel/call_line.rb +0 -15
  1349. data/snip/core/kernel/does.rb +0 -7
  1350. data/snip/core/kernel/message.rb +0 -6
  1351. data/snip/core/kernel/query.rb +0 -15
  1352. data/snip/core/kernel/taint.rb +0 -10
  1353. data/snip/core/logger/clean_logger.rb +0 -10
  1354. data/snip/core/module/attr-old.rb +0 -308
  1355. data/snip/core/module/attr.rb +0 -98
  1356. data/snip/core/module/attr_xxx.rb +0 -22
  1357. data/snip/core/module/by_regexp.rb +0 -21
  1358. data/snip/core/module/cast.rb +0 -64
  1359. data/snip/core/module/class_attribute_accessors.rb +0 -57
  1360. data/snip/core/module/inherit.rb +0 -99
  1361. data/snip/core/module/inherit0.rb +0 -59
  1362. data/snip/core/module/let.rb +0 -51
  1363. data/snip/core/module/meta_attr.rb +0 -60
  1364. data/snip/core/module/module_attribute_accessors.rb +0 -57
  1365. data/snip/core/module/permissions.rb +0 -32
  1366. data/snip/core/module/preserved.rb +0 -108
  1367. data/snip/core/module/sattr_accessor.rb +0 -1
  1368. data/snip/core/module/sattr_reader.rb +0 -1
  1369. data/snip/core/module/sattr_setter.rb +0 -1
  1370. data/snip/core/module/sattr_tester.rb +0 -1
  1371. data/snip/core/module/sattr_writer.rb +0 -1
  1372. data/snip/core/module/tc_attr.rb +0 -107
  1373. data/snip/core/module/to_module.rb +0 -37
  1374. data/snip/core/module/version.rb +0 -23
  1375. data/snip/core/string/frequency.rb +0 -40
  1376. data/snip/core/string/op_add.rb +0 -24
  1377. data/snip/core/string/op_div.rb +0 -15
  1378. data/snip/core/string/pred.rb +0 -217
  1379. data/snip/core/string/probability.rb +0 -35
  1380. data/snip/core/string/to_arr.rb +0 -57
  1381. data/snip/core/string/to_ary.rb +0 -12
  1382. data/snip/core/string/word_wrap.rb +0 -62
  1383. data/snip/more/actionplan.rb +0 -21
  1384. data/snip/more/autoarray.rb +0 -29
  1385. data/snip/more/cache.rb +0 -189
  1386. data/snip/more/capsule2.rb +0 -152
  1387. data/snip/more/class_inheritable_attributes.rb +0 -120
  1388. data/snip/more/classinherit.rb +0 -198
  1389. data/snip/more/clean.rb +0 -35
  1390. data/snip/more/codepack.rb +0 -64
  1391. data/snip/more/commandrunner.rb +0 -101
  1392. data/snip/more/conditionals.rb +0 -106
  1393. data/snip/more/contracts.rb +0 -37
  1394. data/snip/more/daemon.rb +0 -70
  1395. data/snip/more/datetime.rb +0 -42
  1396. data/snip/more/detach.rb +0 -423
  1397. data/snip/more/enumtype.rb +0 -115
  1398. data/snip/more/fixnum_const.rb +0 -55
  1399. data/snip/more/function.rb +0 -278
  1400. data/snip/more/hookse.rb +0 -107
  1401. data/snip/more/indexable.rb +0 -85
  1402. data/snip/more/infinity.rb +0 -123
  1403. data/snip/more/ioreactor.rb +0 -671
  1404. data/snip/more/knowself.rb +0 -42
  1405. data/snip/more/logger_sing.rb +0 -207
  1406. data/snip/more/must.rb +0 -37
  1407. data/snip/more/openproxy.rb +0 -245
  1408. data/snip/more/ostructable.rb +0 -212
  1409. data/snip/more/pairhash.rb +0 -55
  1410. data/snip/more/pathname.rb +0 -1309
  1411. data/snip/more/prereq.rb +0 -36
  1412. data/snip/more/print_exception.rb +0 -35
  1413. data/snip/more/rand.rb +0 -412
  1414. data/snip/more/range.rb +0 -383
  1415. data/snip/more/sanitize.rb +0 -48
  1416. data/snip/more/service.rb +0 -266
  1417. data/snip/more/superstruct.rb +0 -735
  1418. data/snip/more/tag.rb +0 -27
  1419. data/snip/more/testfacility.rb +0 -80
  1420. data/snip/more/timer.rb +0 -164
  1421. data/snip/more/toplevel.rb +0 -76
  1422. data/snip/more/type.rb +0 -232
  1423. data/snip/more/vars.rb +0 -94
  1424. data/snip/more/version.rb +0 -245
  1425. data/snip/more/world.rb +0 -53
  1426. data/snip/reference/sys.rb +0 -186
  1427. data/snip/reference/utils.rb +0 -518
  1428. data/test/lib/facets/core/kernel/test_generate_method_name.rb +0 -26
  1429. data/test/lib/facets/core/module/test_generate_instance_method_name.rb +0 -33
@@ -1,219 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: Date</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Class</span><br />Date</td>
55
- <td align="right">
56
- <table cellspacing=0 cellpadding=2>
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../files/lib/facets/core/date/to_date_rb.html">lib/facets/core/date/to_date.rb</a>
61
- <a href="../files/lib/facets/core/date/days_in_month_rb.html">lib/facets/core/date/days_in_month.rb</a>
62
- <a href="../files/lib/facets/core/date/to_s_rb.html">lib/facets/core/date/to_s.rb</a>
63
- <a href="../files/lib/facets/core/date/stamp_rb.html">lib/facets/core/date/stamp.rb</a>
64
- <a href="../files/lib/facets/core/date/to_time_rb.html">lib/facets/core/date/to_time.rb</a>
65
- <a href="../files/lib/facets/core/date/days_of_month_rb.html">lib/facets/core/date/days_of_month.rb</a>
66
- </td>
67
- </tr>
68
- <tr>
69
- <td>Parent:</td>
70
- <td>
71
- <a href="Object.html">
72
- Object
73
- </a>
74
- </td>
75
- </tr>
76
- </table>
77
- </td>
78
- </tr>
79
- </table>
80
- <!-- banner header -->
81
-
82
- <div id="bodyContent">
83
- <div id="content">
84
-
85
-
86
-
87
-
88
- <div class="sectiontitle">Methods</div>
89
- <ul>
90
- <li><a href="#M000234">days_in_month</a></li>
91
- <li><a href="#M000237">days_of_month</a></li>
92
- <li><a href="#M000235">stamp</a></li>
93
- <li><a href="#M000233">to_date</a></li>
94
- <li><a href="#M000236">to_time</a></li>
95
- </ul>
96
-
97
-
98
-
99
-
100
-
101
-
102
- <div class="sectiontitle">Public Instance methods</div>
103
- <div class="method">
104
- <div class="title">
105
- <a name="M000234"></a><b>days_in_month</b>()
106
- </div>
107
- <div class="description">
108
- <p>
109
- Returns the number of days in the date&#8217;s month.
110
- </p>
111
- <pre>
112
- Date.new(2004,2).days_in_month #=&gt; 28
113
- </pre>
114
- </div>
115
- <div class="sourcecode">
116
- <p class="source-link">[ <a href="javascript:toggleSource('M000234_source')" id="l_M000234_source">show source</a> ]</p>
117
- <div id="M000234_source" class="dyn-source">
118
- <pre>
119
- <span class="ruby-comment cmt"># File lib/facets/core/date/days_in_month.rb, line 12</span>
120
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days_in_month</span>
121
- <span class="ruby-constant">Date</span>.<span class="ruby-identifier">civil</span>(<span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-value">-1</span>).<span class="ruby-identifier">day</span>
122
- <span class="ruby-keyword kw">end</span>
123
- </pre>
124
- </div>
125
- </div>
126
- </div>
127
- <div class="method">
128
- <div class="title">
129
- <a name="M000237"></a><b>days_of_month</b>()
130
- </div>
131
- <div class="sourcecode">
132
- <p class="source-link">[ <a href="javascript:toggleSource('M000237_source')" id="l_M000237_source">show source</a> ]</p>
133
- <div id="M000237_source" class="dyn-source">
134
- <pre>
135
- <span class="ruby-comment cmt"># File lib/facets/core/date/days_of_month.rb, line 5</span>
136
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days_of_month</span>
137
- (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">days_in_month</span>).<span class="ruby-identifier">to_a</span>
138
- <span class="ruby-keyword kw">end</span>
139
- </pre>
140
- </div>
141
- </div>
142
- </div>
143
- <div class="method">
144
- <div class="title">
145
- <a name="M000235"></a><b>stamp</b>(format = nil)
146
- </div>
147
- <div class="description">
148
- <p>
149
- An enhanched to_s method that cane take an optional format flag of :short
150
- or :long.
151
- </p>
152
- </div>
153
- <div class="sourcecode">
154
- <p class="source-link">[ <a href="javascript:toggleSource('M000235_source')" id="l_M000235_source">show source</a> ]</p>
155
- <div id="M000235_source" class="dyn-source">
156
- <pre>
157
- <span class="ruby-comment cmt"># File lib/facets/core/date/stamp.rb, line 8</span>
158
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stamp</span>(<span class="ruby-identifier">format</span> = <span class="ruby-keyword kw">nil</span>)
159
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">format</span>
160
- <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:short</span>
161
- <span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot;%e %b&quot;</span>).<span class="ruby-identifier">strip</span>
162
- <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:long</span>
163
- <span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot;%B %e, %Y&quot;</span>).<span class="ruby-identifier">strip</span>
164
- <span class="ruby-keyword kw">else</span>
165
- <span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot;%Y-%m-%d&quot;</span>) <span class="ruby-comment cmt"># standard to_s</span>
166
- <span class="ruby-keyword kw">end</span>
167
- <span class="ruby-keyword kw">end</span>
168
- </pre>
169
- </div>
170
- </div>
171
- </div>
172
- <div class="method">
173
- <div class="title">
174
- <a name="M000233"></a><b>to_date</b>()
175
- </div>
176
- <div class="description">
177
- <p>
178
- To be able to keep Dates and Times interchangeable on conversions.
179
- </p>
180
- </div>
181
- <div class="sourcecode">
182
- <p class="source-link">[ <a href="javascript:toggleSource('M000233_source')" id="l_M000233_source">show source</a> ]</p>
183
- <div id="M000233_source" class="dyn-source">
184
- <pre>
185
- <span class="ruby-comment cmt"># File lib/facets/core/date/to_date.rb, line 7</span>
186
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_date</span>
187
- <span class="ruby-keyword kw">self</span>
188
- <span class="ruby-keyword kw">end</span>
189
- </pre>
190
- </div>
191
- </div>
192
- </div>
193
- <div class="method">
194
- <div class="title">
195
- <a name="M000236"></a><b>to_time</b>(form = :local)
196
- </div>
197
- <div class="description">
198
- <p>
199
- Convert <a href="Date.html">Date</a> to <a href="Time.html">Time</a>.
200
- </p>
201
- </div>
202
- <div class="sourcecode">
203
- <p class="source-link">[ <a href="javascript:toggleSource('M000236_source')" id="l_M000236_source">show source</a> ]</p>
204
- <div id="M000236_source" class="dyn-source">
205
- <pre>
206
- <span class="ruby-comment cmt"># File lib/facets/core/date/to_time.rb, line 7</span>
207
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_time</span>(<span class="ruby-identifier">form</span> = <span class="ruby-identifier">:local</span>)
208
- <span class="ruby-operator">::</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">form</span>, <span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">day</span>)
209
- <span class="ruby-keyword kw">end</span>
210
- </pre>
211
- </div>
212
- </div>
213
- </div>
214
- </div>
215
-
216
- </div>
217
-
218
- </body>
219
- </html>
@@ -1,208 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: Dir</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Class</span><br />Dir</td>
55
- <td align="right">
56
- <table cellspacing=0 cellpadding=2>
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../files/lib/facets/core/dir/self/ls_r_rb.html">lib/facets/core/dir/self/ls_r.rb</a>
61
- <a href="../files/lib/facets/core/dir/self/ancestor_rb.html">lib/facets/core/dir/self/ancestor.rb</a>
62
- <a href="../files/lib/facets/core/dir/self/ascend_rb.html">lib/facets/core/dir/self/ascend.rb</a>
63
- <a href="../files/lib/facets/core/dir/self/descend_rb.html">lib/facets/core/dir/self/descend.rb</a>
64
- </td>
65
- </tr>
66
- <tr>
67
- <td>Parent:</td>
68
- <td>
69
- <a href="Object.html">
70
- Object
71
- </a>
72
- </td>
73
- </tr>
74
- </table>
75
- </td>
76
- </tr>
77
- </table>
78
- <!-- banner header -->
79
-
80
- <div id="bodyContent">
81
- <div id="content">
82
-
83
-
84
-
85
-
86
- <div class="sectiontitle">Methods</div>
87
- <ul>
88
- <li><a href="#M000044">ancestor?</a></li>
89
- <li><a href="#M000045">ascend</a></li>
90
- <li><a href="#M000046">descend</a></li>
91
- <li><a href="#M000043">ls_r</a></li>
92
- </ul>
93
-
94
-
95
-
96
-
97
-
98
-
99
- <div class="sectiontitle">Public Class methods</div>
100
- <div class="method">
101
- <div class="title">
102
- <a name="M000044"></a><b>ancestor?</b>(parent_path, child_path)
103
- </div>
104
- <div class="description">
105
- <p>
106
- Is a path parental to another?
107
- </p>
108
- </div>
109
- <div class="sourcecode">
110
- <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
111
- <div id="M000044_source" class="dyn-source">
112
- <pre>
113
- <span class="ruby-comment cmt"># File lib/facets/core/dir/self/ancestor.rb, line 8</span>
114
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestor?</span>(<span class="ruby-identifier">parent_path</span>, <span class="ruby-identifier">child_path</span>)
115
- <span class="ruby-node">%r|^#{Regexp.escape(parent_path)}|</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">child_path</span>
116
- <span class="ruby-keyword kw">end</span>
117
- </pre>
118
- </div>
119
- </div>
120
- </div>
121
- <div class="method">
122
- <div class="title">
123
- <a name="M000045"></a><b>ascend</b>( dir, inclusive=true, &amp;blk)
124
- </div>
125
- <div class="description">
126
- <p>
127
- Ascend a directory path.
128
- </p>
129
- </div>
130
- <div class="sourcecode">
131
- <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
132
- <div id="M000045_source" class="dyn-source">
133
- <pre>
134
- <span class="ruby-comment cmt"># File lib/facets/core/dir/self/ascend.rb, line 6</span>
135
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ascend</span>( <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">inclusive</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
136
- <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">dup</span>
137
- <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-identifier">dir</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">inclusive</span>
138
- <span class="ruby-identifier">ri</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">'/'</span>)
139
- <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">ri</span>
140
- <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ri</span>)
141
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dir</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
142
- <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-value str">'/'</span> ) ; <span class="ruby-keyword kw">break</span>
143
- <span class="ruby-keyword kw">end</span>
144
- <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-identifier">dir</span> )
145
- <span class="ruby-identifier">ri</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">'/'</span>)
146
- <span class="ruby-keyword kw">end</span>
147
- <span class="ruby-keyword kw">end</span>
148
- </pre>
149
- </div>
150
- </div>
151
- </div>
152
- <div class="method">
153
- <div class="title">
154
- <a name="M000046"></a><b>descend</b>( path ) {|| ...}
155
- </div>
156
- <div class="sourcecode">
157
- <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
158
- <div id="M000046_source" class="dyn-source">
159
- <pre>
160
- <span class="ruby-comment cmt"># File lib/facets/core/dir/self/descend.rb, line 4</span>
161
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">descend</span>( <span class="ruby-identifier">path</span> ) <span class="ruby-comment cmt">#:yield:</span>
162
- <span class="ruby-identifier">paths</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
163
- <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
164
- <span class="ruby-keyword kw">yield</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">paths</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">n</span>] )
165
- <span class="ruby-keyword kw">end</span>
166
- <span class="ruby-keyword kw">end</span>
167
- </pre>
168
- </div>
169
- </div>
170
- </div>
171
- <div class="method">
172
- <div class="title">
173
- <a name="M000043"></a><b>ls_r</b>(path='.', &amp;block)
174
- </div>
175
- <div class="description">
176
- <p>
177
- Recursively scan a directory and pass each file to the given block.
178
- </p>
179
- </div>
180
- <div class="sourcecode">
181
- <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
182
- <div id="M000043_source" class="dyn-source">
183
- <pre>
184
- <span class="ruby-comment cmt"># File lib/facets/core/dir/self/ls_r.rb, line 8</span>
185
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ls_r</span>(<span class="ruby-identifier">path</span>=<span class="ruby-value str">'.'</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
186
- <span class="ruby-identifier">list</span> = []
187
- <span class="ruby-identifier">stoplist</span> = [<span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span>]
188
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
189
- <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stoplist</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">f</span>)
190
- <span class="ruby-identifier">filename</span> = <span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">f</span>
191
- <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">filename</span>
192
- <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
193
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">filename</span>)
194
- <span class="ruby-identifier">list</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">recurse</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) )
195
- <span class="ruby-keyword kw">end</span>
196
- <span class="ruby-keyword kw">end</span>
197
- <span class="ruby-identifier">list</span>
198
- <span class="ruby-keyword kw">end</span>
199
- </pre>
200
- </div>
201
- </div>
202
- </div>
203
- </div>
204
-
205
- </div>
206
-
207
- </body>
208
- </html>
@@ -1,1462 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Module: Enumerable</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Module</span><br />Enumerable</td>
55
- <td align="right">
56
- <table cellspacing=0 cellpadding=2>
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../files/lib/facets/core/enumerable/find_collisions_rb.html">lib/facets/core/enumerable/find_collisions.rb</a>
61
- <a href="../files/lib/facets/core/enumerable/ew_rb.html">lib/facets/core/enumerable/ew.rb</a>
62
- <a href="../files/lib/facets/core/enumerable/graph_rb.html">lib/facets/core/enumerable/graph.rb</a>
63
- <a href="../files/lib/facets/core/enumerable/filter_collect_rb.html">lib/facets/core/enumerable/filter_collect.rb</a>
64
- <a href="../files/lib/facets/core/enumerable/ideal_entropy_rb.html">lib/facets/core/enumerable/ideal_entropy.rb</a>
65
- <a href="../files/lib/facets/core/enumerable/where_rb.html">lib/facets/core/enumerable/where.rb</a>
66
- <a href="../files/lib/facets/core/enumerable/partition_by_rb.html">lib/facets/core/enumerable/partition_by.rb</a>
67
- <a href="../files/lib/facets/core/enumerable/nonuniq_rb.html">lib/facets/core/enumerable/nonuniq.rb</a>
68
- <a href="../files/lib/facets/core/enumerable/probability_rb.html">lib/facets/core/enumerable/probability.rb</a>
69
- <a href="../files/lib/facets/core/enumerable/collect_with_index_rb.html">lib/facets/core/enumerable/collect_with_index.rb</a>
70
- <a href="../files/lib/facets/core/enumerable/to_h_rb.html">lib/facets/core/enumerable/to_h.rb</a>
71
- <a href="../files/lib/facets/core/enumerable/each_pair_rb.html">lib/facets/core/enumerable/each_pair.rb</a>
72
- <a href="../files/lib/facets/core/enumerable/every_rb.html">lib/facets/core/enumerable/every.rb</a>
73
- <a href="../files/lib/facets/core/enumerable/compact_collect_rb.html">lib/facets/core/enumerable/compact_collect.rb</a>
74
- <a href="../files/lib/facets/core/enumerable/one_rb.html">lib/facets/core/enumerable/one.rb</a>
75
- <a href="../files/lib/facets/core/enumerable/none_rb.html">lib/facets/core/enumerable/none.rb</a>
76
- <a href="../files/lib/facets/core/enumerable/project_rb.html">lib/facets/core/enumerable/project.rb</a>
77
- <a href="../files/lib/facets/core/enumerable/op_pow_rb.html">lib/facets/core/enumerable/op_pow.rb</a>
78
- <a href="../files/lib/facets/core/enumerable/frequency_rb.html">lib/facets/core/enumerable/frequency.rb</a>
79
- <a href="../files/lib/facets/core/enumerable/permute_rb.html">lib/facets/core/enumerable/permute.rb</a>
80
- <a href="../files/lib/facets/core/enumerable/occur_rb.html">lib/facets/core/enumerable/occur.rb</a>
81
- <a href="../files/lib/facets/core/enumerable/commonality_rb.html">lib/facets/core/enumerable/commonality.rb</a>
82
- <a href="../files/lib/facets/core/enumerable/each_slice_rb.html">lib/facets/core/enumerable/each_slice.rb</a>
83
- <a href="../files/lib/facets/core/enumerable/entropy_rb.html">lib/facets/core/enumerable/entropy.rb</a>
84
- <a href="../files/lib/facets/core/enumerable/each_with_counter_rb.html">lib/facets/core/enumerable/each_with_counter.rb</a>
85
- <a href="../files/lib/facets/core/enumerable/uniq_by_rb.html">lib/facets/core/enumerable/uniq_by.rb</a>
86
- <a href="../files/lib/facets/core/enumerable/cross_rb.html">lib/facets/core/enumerable/cross.rb</a>
87
- <a href="../files/lib/facets/core/enumerable/accumulate_rb.html">lib/facets/core/enumerable/accumulate.rb</a>
88
- <a href="../files/lib/facets/core/enumerable/collect_if_rb.html">lib/facets/core/enumerable/collect_if.rb</a>
89
- <a href="../files/lib/facets/core/enumerable/count_rb.html">lib/facets/core/enumerable/count.rb</a>
90
- <a href="../files/lib/facets/core/enumerable/mode_rb.html">lib/facets/core/enumerable/mode.rb</a>
91
- <a href="../files/lib/facets/core/enumerable/cascade_rb.html">lib/facets/core/enumerable/cascade.rb</a>
92
- <a href="../files/lib/facets/core/enumerable/self/combinations_rb.html">lib/facets/core/enumerable/self/combinations.rb</a>
93
- <a href="../files/lib/facets/core/enumerable/self/cross_rb.html">lib/facets/core/enumerable/self/cross.rb</a>
94
- </td>
95
- </tr>
96
- </table>
97
- </td>
98
- </tr>
99
- </table>
100
- <!-- banner header -->
101
-
102
- <div id="bodyContent">
103
- <div id="content">
104
-
105
-
106
-
107
-
108
- <div class="sectiontitle">Methods</div>
109
- <ul>
110
- <li><a href="#M000490">**</a></li>
111
- <li><a href="#M000502">accumulate</a></li>
112
- <li><a href="#M000507">cascade</a></li>
113
- <li><a href="#M000503">collect_if</a></li>
114
- <li><a href="#M000480">collect_with_counter</a></li>
115
- <li><a href="#M000478">collect_with_index</a></li>
116
- <li><a href="#M000508">combinations</a></li>
117
- <li><a href="#M000496">commonality</a></li>
118
- <li><a href="#M000485">compact_collect</a></li>
119
- <li><a href="#M000486">compact_map</a></li>
120
- <li><a href="#M000505">count</a></li>
121
- <li><a href="#M000501">cross</a></li>
122
- <li><a href="#M000509">cross</a></li>
123
- <li><a href="#M000498">each_by</a></li>
124
- <li><a href="#M000483">each_pair</a></li>
125
- <li><a href="#M000494">each_permutation</a></li>
126
- <li><a href="#M000497">each_slice</a></li>
127
- <li><a href="#M000467">elementwise</a></li>
128
- <li><a href="#M000499">entropy</a></li>
129
- <li><a href="#M000484">every</a></li>
130
- <li><a href="#M000468">ew</a></li>
131
- <li><a href="#M000470">filter_collect</a></li>
132
- <li><a href="#M000471">filter_map</a></li>
133
- <li><a href="#M000466">find_collisions</a></li>
134
- <li><a href="#M000491">frequency</a></li>
135
- <li><a href="#M000469">graph</a></li>
136
- <li><a href="#M000472">ideal_entropy</a></li>
137
- <li><a href="#M000504">map_if</a></li>
138
- <li><a href="#M000481">map_with_counter</a></li>
139
- <li><a href="#M000479">map_with_index</a></li>
140
- <li><a href="#M000506">mode</a></li>
141
- <li><a href="#M000488">none?</a></li>
142
- <li><a href="#M000475">nonuniq</a></li>
143
- <li><a href="#M000476">nonuniq!</a></li>
144
- <li><a href="#M000495">occur</a></li>
145
- <li><a href="#M000487">one?</a></li>
146
- <li><a href="#M000474">partition_by</a></li>
147
- <li><a href="#M000493">permutation_number</a></li>
148
- <li><a href="#M000492">permute</a></li>
149
- <li><a href="#M000477">probability</a></li>
150
- <li><a href="#M000489">project</a></li>
151
- <li><a href="#M000482">to_h</a></li>
152
- <li><a href="#M000500">uniq_by</a></li>
153
- <li><a href="#M000473">where</a></li>
154
- </ul>
155
-
156
-
157
-
158
-
159
-
160
-
161
- <div class="sectiontitle">Public Class methods</div>
162
- <div class="method">
163
- <div class="title">
164
- <a name="M000508"></a><b>combinations</b>(head, *rest)
165
- </div>
166
- <div class="description">
167
- <p>
168
- Produces an array of arrays of all possible combinations of the given
169
- arrays in the position given. (Explain me better?)
170
- </p>
171
- <pre>
172
- a = %w|a b|
173
- b = %w|a x|
174
- c = %w|x y|
175
- Array.combinations(a, b, c).each { |x| p x }
176
- </pre>
177
- <p>
178
- produces
179
- </p>
180
- <pre>
181
- [&quot;a&quot;, &quot;a&quot;, &quot;x&quot;]
182
- [&quot;a&quot;, &quot;a&quot;, &quot;y&quot;]
183
- [&quot;a&quot;, &quot;x&quot;, &quot;x&quot;]
184
- [&quot;a&quot;, &quot;x&quot;, &quot;y&quot;]
185
- [&quot;b&quot;, &quot;a&quot;, &quot;x&quot;]
186
- [&quot;b&quot;, &quot;a&quot;, &quot;y&quot;]
187
- [&quot;b&quot;, &quot;x&quot;, &quot;x&quot;]
188
- [&quot;b&quot;, &quot;x&quot;, &quot;y&quot;]
189
- </pre>
190
- </div>
191
- <div class="sourcecode">
192
- <p class="source-link">[ <a href="javascript:toggleSource('M000508_source')" id="l_M000508_source">show source</a> ]</p>
193
- <div id="M000508_source" class="dyn-source">
194
- <pre>
195
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/combinations.rb, line 23</span>
196
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">combinations</span>(<span class="ruby-identifier">head</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">rest</span>)
197
- <span class="ruby-identifier">crest</span> = <span class="ruby-identifier">rest</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span>[[]] <span class="ruby-operator">:</span> <span class="ruby-identifier">combinations</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">rest</span>)
198
- <span class="ruby-identifier">head</span>.<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">combs</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
199
- <span class="ruby-identifier">combs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">crest</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">comb</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">item</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">comb</span> }
200
- }
201
- <span class="ruby-keyword kw">end</span>
202
- </pre>
203
- </div>
204
- </div>
205
- </div>
206
- <div class="method">
207
- <div class="title">
208
- <a name="M000509"></a><b>cross</b>(*enums, &amp;block)
209
- </div>
210
- <div class="description">
211
- <p>
212
- Provides the cross-product of two or more Enumerables. This is the
213
- class-level method. The instance method calls on this.
214
- </p>
215
- <pre>
216
- Enumerable.cross([1,2], [4], [&quot;apple&quot;, &quot;banana&quot;])
217
- #=&gt; [[1, 4, &quot;apple&quot;], [1, 4, &quot;banana&quot;], [2, 4, &quot;apple&quot;], [2, 4, &quot;banana&quot;]]
218
-
219
- Enumerable.cross([1,2], [3,4])
220
- #=&gt; [[1, 3], [1, 4], [2, 3], [2, 4]]
221
- </pre>
222
- </div>
223
- <div class="sourcecode">
224
- <p class="source-link">[ <a href="javascript:toggleSource('M000509_source')" id="l_M000509_source">show source</a> ]</p>
225
- <div id="M000509_source" class="dyn-source">
226
- <pre>
227
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/cross.rb, line 21</span>
228
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
229
-
230
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">enums</span>.<span class="ruby-identifier">empty?</span>
231
- <span class="ruby-identifier">gens</span> = <span class="ruby-identifier">enums</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-constant">Generator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">e</span>)}
232
- <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gens</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">g</span><span class="ruby-operator">|</span> <span class="ruby-identifier">g</span>.<span class="ruby-identifier">end?</span>}
233
-
234
- <span class="ruby-identifier">sz</span> = <span class="ruby-identifier">gens</span>.<span class="ruby-identifier">size</span>
235
- <span class="ruby-identifier">res</span> = []
236
- <span class="ruby-identifier">tuple</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sz</span>)
237
-
238
- <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
239
- <span class="ruby-comment cmt"># fill tuple</span>
240
- (<span class="ruby-value">0</span> <span class="ruby-operator">...</span> <span class="ruby-identifier">sz</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
241
- <span class="ruby-identifier">tuple</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">current</span>
242
- }
243
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
244
- <span class="ruby-identifier">res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>
245
- <span class="ruby-keyword kw">else</span>
246
- <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>)
247
- <span class="ruby-keyword kw">end</span>
248
-
249
- <span class="ruby-comment cmt"># step forward</span>
250
- <span class="ruby-identifier">gens</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">next</span>
251
- (<span class="ruby-identifier">sz</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
252
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">end?</span>
253
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
254
- <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">rewind</span>
255
- <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">next</span>
256
- <span class="ruby-keyword kw">else</span>
257
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">res</span>
258
- <span class="ruby-keyword kw">end</span>
259
- <span class="ruby-keyword kw">end</span>
260
- <span class="ruby-keyword kw">end</span>
261
- <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#loop</span>
262
-
263
- <span class="ruby-keyword kw">end</span>
264
- </pre>
265
- </div>
266
- </div>
267
- </div>
268
- <div class="sectiontitle">Public Instance methods</div>
269
- <div class="method">
270
- <div class="title">
271
- <a name="M000490"></a><b>**</b>(enum)
272
- </div>
273
- <div class="description">
274
- <p>
275
- Operator alias for cross-product.
276
- </p>
277
- <pre>
278
- a = [1,2] ** [4,5]
279
- a #=&gt; [[1, 4],[1, 5],[2, 4],[2, 5]]
280
- </pre>
281
- </div>
282
- <div class="sourcecode">
283
- <p class="source-link">[ <a href="javascript:toggleSource('M000490_source')" id="l_M000490_source">show source</a> ]</p>
284
- <div id="M000490_source" class="dyn-source">
285
- <pre>
286
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/op_pow.rb, line 11</span>
287
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-identifier">enum</span>)
288
- <span class="ruby-constant">Enumerable</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">enum</span>)
289
- <span class="ruby-keyword kw">end</span>
290
- </pre>
291
- </div>
292
- </div>
293
- </div>
294
- <div class="method">
295
- <div class="title">
296
- <a name="M000502"></a><b>accumulate</b>()
297
- </div>
298
- <div class="description">
299
- <p>
300
- Project has_many Group Group has_many User projects.groups.accumulate.users
301
- </p>
302
- </div>
303
- <div class="sourcecode">
304
- <p class="source-link">[ <a href="javascript:toggleSource('M000502_source')" id="l_M000502_source">show source</a> ]</p>
305
- <div id="M000502_source" class="dyn-source">
306
- <pre>
307
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/accumulate.rb, line 16</span>
308
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accumulate</span>
309
- <span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
310
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }.<span class="ruby-identifier">flatten</span>
311
- <span class="ruby-keyword kw">end</span>
312
- <span class="ruby-keyword kw">end</span>
313
- </pre>
314
- </div>
315
- </div>
316
- </div>
317
- <div class="method">
318
- <div class="title">
319
- <a name="M000507"></a><b>cascade</b>(*methods)
320
- </div>
321
- <div class="description">
322
- <p>
323
- Cascade actions on each enumerated element.
324
- </p>
325
- <p>
326
- [9, 19, 29].cascade :succ, :to_s, :reverse
327
- </p>
328
- <h1>&gt; [&quot;01&quot;, &quot;02&quot;, &quot;03&quot;]</h1>
329
- </div>
330
- <div class="sourcecode">
331
- <p class="source-link">[ <a href="javascript:toggleSource('M000507_source')" id="l_M000507_source">show source</a> ]</p>
332
- <div id="M000507_source" class="dyn-source">
333
- <pre>
334
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/cascade.rb, line 12</span>
335
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cascade</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">methods</span>)
336
- <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-keyword kw">self</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">ary</span>, <span class="ruby-identifier">method</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>)}}
337
- <span class="ruby-keyword kw">end</span>
338
- </pre>
339
- </div>
340
- </div>
341
- </div>
342
- <div class="method">
343
- <div class="title">
344
- <a name="M000503"></a><b>collect_if</b>(&amp;b)
345
- </div>
346
- <div class="aka">
347
- This method is also aliased as
348
- <a href="Enumerable.html#M000504">map_if</a>
349
- </div>
350
- <div class="sourcecode">
351
- <p class="source-link">[ <a href="javascript:toggleSource('M000503_source')" id="l_M000503_source">show source</a> ]</p>
352
- <div id="M000503_source" class="dyn-source">
353
- <pre>
354
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_if.rb, line 4</span>
355
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_if</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
356
- <span class="ruby-identifier">a</span> = <span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
357
- <span class="ruby-comment cmt"># to get the same semantics as select{|e| e}</span>
358
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">false</span>)
359
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">compact!</span>
360
- <span class="ruby-identifier">a</span>
361
- <span class="ruby-keyword kw">end</span>
362
- </pre>
363
- </div>
364
- </div>
365
- </div>
366
- <div class="method">
367
- <div class="title">
368
- <a name="M000480"></a><b>collect_with_counter</b>()
369
- </div>
370
- <div class="description">
371
- <p>
372
- Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
373
- </p>
374
- </div>
375
- </div>
376
- <div class="method">
377
- <div class="title">
378
- <a name="M000478"></a><b>collect_with_index</b>() {|self[i], i| ...}
379
- </div>
380
- <div class="description">
381
- <p>
382
- Same as collect but with an iteration counter.
383
- </p>
384
- <pre>
385
- a = [1,2,3].collect_with_index { |e,i| e*i }
386
- a #=&gt; [0,2,6]
387
- </pre>
388
- </div>
389
- <div class="aka">
390
- This method is also aliased as
391
- <a href="Enumerable.html#M000479">map_with_index</a>
392
- <a href="Enumerable.html#M000480">collect_with_counter</a>
393
- <a href="Enumerable.html#M000481">map_with_counter</a>
394
- </div>
395
- <div class="sourcecode">
396
- <p class="source-link">[ <a href="javascript:toggleSource('M000478_source')" id="l_M000478_source">show source</a> ]</p>
397
- <div id="M000478_source" class="dyn-source">
398
- <pre>
399
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_with_index.rb, line 9</span>
400
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_with_index</span>
401
- <span class="ruby-identifier">r</span> = []
402
- <span class="ruby-identifier">each_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
403
- <span class="ruby-identifier">r</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">i</span>)
404
- <span class="ruby-keyword kw">end</span>
405
- <span class="ruby-identifier">r</span>
406
- <span class="ruby-keyword kw">end</span>
407
- </pre>
408
- </div>
409
- </div>
410
- </div>
411
- <div class="method">
412
- <div class="title">
413
- <a name="M000496"></a><b>commonality</b>( &amp;block )
414
- </div>
415
- <div class="description">
416
- <p>
417
- Returns all items that are equal in terms of the supplied block. If no
418
- block is given objects are considered to be equal if they return the same
419
- value for Object#hash and if obj1 == obj2. No guarantee about the order of
420
- the elements in the resulting array is made.
421
- </p>
422
- <p>
423
- Note: The result will be an array if you supply no block and a hash
424
- otherwise.
425
- </p>
426
- <pre>
427
- [1, 2, 2, 3, 4, 4].commonality # =&gt; { 2 =&gt; [2], 4 =&gt; [4] }
428
-
429
- [&quot;foo&quot;, &quot;bar&quot;, &quot;a&quot;].commonality { |str| str.length }
430
- # =&gt; { 2 =&gt; [&quot;foo, &quot;bar&quot;] }
431
-
432
- # Returns all persons that share their last name with another person.
433
- persons.collisions { |person| person.last_name }
434
- </pre>
435
- </div>
436
- <div class="sourcecode">
437
- <p class="source-link">[ <a href="javascript:toggleSource('M000496_source')" id="l_M000496_source">show source</a> ]</p>
438
- <div id="M000496_source" class="dyn-source">
439
- <pre>
440
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/commonality.rb, line 22</span>
441
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> )
442
- <span class="ruby-identifier">had_no_block</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">block</span>
443
- <span class="ruby-identifier">block</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">item</span> }
444
- <span class="ruby-identifier">result</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> }
445
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
446
- <span class="ruby-identifier">key</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">item</span>)
447
- <span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">item</span>
448
- <span class="ruby-keyword kw">end</span>
449
- <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span>
450
- <span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">1</span>
451
- <span class="ruby-keyword kw">end</span>
452
- <span class="ruby-comment cmt">#return had_no_block ? result.values.flatten : result</span>
453
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
454
- <span class="ruby-keyword kw">end</span>
455
- </pre>
456
- </div>
457
- </div>
458
- </div>
459
- <div class="method">
460
- <div class="title">
461
- <a name="M000485"></a><b>compact_collect</b>( {|| ...}
462
- </div>
463
- <div class="description">
464
- <p>
465
- Collects/Maps and compacts items in one single step. The items for which
466
- the supplied block returns <tt>nil</tt> will not end up in the resulting
467
- array.
468
- </p>
469
- <pre>
470
- # Return telephone numbers of all persons that have a telephone number.
471
- persons.compact_collect { |person| person.telephone_no }
472
- </pre>
473
- <p>
474
- Also see Enumerable#collect, Enumerable#map, Array#compact.
475
- </p>
476
- </div>
477
- <div class="aka">
478
- This method is also aliased as
479
- <a href="Enumerable.html#M000486">compact_map</a>
480
- </div>
481
- <div class="sourcecode">
482
- <p class="source-link">[ <a href="javascript:toggleSource('M000485_source')" id="l_M000485_source">show source</a> ]</p>
483
- <div id="M000485_source" class="dyn-source">
484
- <pre>
485
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/compact_collect.rb, line 17</span>
486
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compact_collect</span> <span class="ruby-comment cmt">#:yield:</span>
487
- <span class="ruby-identifier">filter_collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
488
- <span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
489
- <span class="ruby-identifier">throw</span>(<span class="ruby-identifier">:skip</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_item</span>.<span class="ruby-identifier">nil?</span>
490
- <span class="ruby-identifier">new_item</span>
491
- <span class="ruby-keyword kw">end</span>
492
- <span class="ruby-keyword kw">end</span>
493
- </pre>
494
- </div>
495
- </div>
496
- </div>
497
- <div class="method">
498
- <div class="title">
499
- <a name="M000486"></a><b>compact_map</b>(
500
- </div>
501
- <div class="description">
502
- <p>
503
- Alias for <a href="Enumerable.html#M000485">compact_collect</a>
504
- </p>
505
- </div>
506
- </div>
507
- <div class="method">
508
- <div class="title">
509
- <a name="M000505"></a><b>count</b>(*c)
510
- </div>
511
- <div class="description">
512
- <p>
513
- Count the number of items in an enuerable equal (==) to the given object.
514
- </p>
515
- <pre>
516
- e = [ 'a', '1', 'a' ]
517
- e.count('1') #=&gt; 1
518
- e.count('a') #=&gt; 2
519
- </pre>
520
- <p>
521
- Count can also handle multiple-valued blocks.
522
- </p>
523
- <pre>
524
- e = { 'a' =&gt; 2, 'a' =&gt; 2, 'b' =&gt; 1 }
525
- e.count('a',2) #=&gt; 1
526
- </pre>
527
- </div>
528
- <div class="sourcecode">
529
- <p class="source-link">[ <a href="javascript:toggleSource('M000505_source')" id="l_M000505_source">show source</a> ]</p>
530
- <div id="M000505_source" class="dyn-source">
531
- <pre>
532
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/count.rb, line 16</span>
533
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">c</span>)
534
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">select</span>{ <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">c</span> }.<span class="ruby-identifier">length</span>
535
- <span class="ruby-keyword kw">end</span>
536
- </pre>
537
- </div>
538
- </div>
539
- </div>
540
- <div class="method">
541
- <div class="title">
542
- <a name="M000501"></a><b>cross</b>(*enums, &amp;block)
543
- </div>
544
- <div class="description">
545
- <p>
546
- The instance level cross-product method.
547
- </p>
548
- <pre>
549
- a = []
550
- [1,2].cross([4,5]){|elem| a &lt;&lt; elem }
551
- a #=&gt; [[1, 4],[1, 5],[2, 4],[2, 5]]
552
- </pre>
553
- </div>
554
- <div class="sourcecode">
555
- <p class="source-link">[ <a href="javascript:toggleSource('M000501_source')" id="l_M000501_source">show source</a> ]</p>
556
- <div id="M000501_source" class="dyn-source">
557
- <pre>
558
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/cross.rb, line 17</span>
559
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cross</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
560
- <span class="ruby-constant">Enumerable</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
561
- <span class="ruby-keyword kw">end</span>
562
- </pre>
563
- </div>
564
- </div>
565
- </div>
566
- <div class="method">
567
- <div class="title">
568
- <a name="M000498"></a><b>each_by</b>(step=nil, &amp;yld)
569
- </div>
570
- <div class="description">
571
- <p>
572
- Alias for <a href="Enumerable.html#M000497">each_slice</a>
573
- </p>
574
- </div>
575
- </div>
576
- <div class="method">
577
- <div class="title">
578
- <a name="M000483"></a><b>each_pair</b>( {|| ...}
579
- </div>
580
- <div class="description">
581
- <p>
582
- Iterators ovr each element pairing.
583
- </p>
584
- <pre>
585
- [:a,:b,:c,:d].each_pair { |a,b| puts &quot;#{a} -&gt; #{b}&quot; }
586
- </pre>
587
- <p>
588
- <em>produces</em>
589
- </p>
590
- <pre>
591
- a -&gt; b
592
- c -&gt; d
593
- </pre>
594
- </div>
595
- <div class="sourcecode">
596
- <p class="source-link">[ <a href="javascript:toggleSource('M000483_source')" id="l_M000483_source">show source</a> ]</p>
597
- <div id="M000483_source" class="dyn-source">
598
- <pre>
599
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_pair.rb, line 13</span>
600
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_pair</span> <span class="ruby-comment cmt">#:yield:</span>
601
- <span class="ruby-identifier">e1</span> = <span class="ruby-keyword kw">nil</span>
602
- <span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
603
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
604
- <span class="ruby-identifier">e1</span> = <span class="ruby-identifier">e</span>
605
- <span class="ruby-keyword kw">next</span>
606
- <span class="ruby-keyword kw">else</span>
607
- <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e1</span>,<span class="ruby-identifier">e</span>)
608
- <span class="ruby-keyword kw">end</span>
609
- <span class="ruby-keyword kw">end</span>
610
- <span class="ruby-keyword kw">end</span>
611
- </pre>
612
- </div>
613
- </div>
614
- </div>
615
- <div class="method">
616
- <div class="title">
617
- <a name="M000494"></a><b>each_permutation</b>() {|out| ...}
618
- </div>
619
- <div class="description">
620
- <p>
621
- Applys a block to each possible permutation of an array/enumerable.
622
- </p>
623
- <pre>
624
- %w[a b c].each_permutation { |x| puts(x.join('')) }
625
- </pre>
626
- <p>
627
- produces
628
- </p>
629
- <pre>
630
- abc
631
- acb
632
- bac
633
- bca
634
- cab
635
- cba
636
- </pre>
637
- </div>
638
- <div class="sourcecode">
639
- <p class="source-link">[ <a href="javascript:toggleSource('M000494_source')" id="l_M000494_source">show source</a> ]</p>
640
- <div id="M000494_source" class="dyn-source">
641
- <pre>
642
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 49</span>
643
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_permutation</span>()
644
- <span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
645
- <span class="ruby-identifier">size</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>
646
- <span class="ruby-identifier">perm_count</span> = (<span class="ruby-value">1</span><span class="ruby-operator">...</span><span class="ruby-identifier">size</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">factorial</span> }
647
- <span class="ruby-identifier">weights</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>).<span class="ruby-identifier">factorial</span> }
648
- <span class="ruby-identifier">s</span> = <span class="ruby-identifier">weights</span>.<span class="ruby-identifier">size</span>
649
- <span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span>,<span class="ruby-identifier">v</span>,<span class="ruby-identifier">pos</span> = <span class="ruby-keyword kw">nil</span>
650
- <span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">perm_count</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
651
- <span class="ruby-identifier">out</span> = <span class="ruby-identifier">arr</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">0</span>]
652
- <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
653
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
654
- <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">:</span> <span class="ruby-keyword kw">next</span>
655
- <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">s</span><span class="ruby-operator">:</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">v</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>], <span class="ruby-identifier">x</span>)
656
- <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">v</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">/</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>], <span class="ruby-identifier">x</span>)
657
- <span class="ruby-keyword kw">end</span>
658
- }
659
- <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">out</span>
660
- <span class="ruby-keyword kw">end</span>
661
- <span class="ruby-keyword kw">end</span>
662
- </pre>
663
- </div>
664
- </div>
665
- </div>
666
- <div class="method">
667
- <div class="title">
668
- <a name="M000497"></a><b>each_slice</b>(step=nil, &amp;yld)
669
- </div>
670
- <div class="description">
671
- <p>
672
- Iterate through slices. If slicing <em>step</em> is not given, the the
673
- arity if the block is used.
674
- </p>
675
- <pre>
676
- x = []
677
- [1,2,3,4].each_slice(2){ |a,b| x &lt;&lt; [a,b] }
678
- x #=&gt; [ [1,2], [3,4] ]
679
-
680
- x = []
681
- [1,2,3,4,5,6].each_slice(3){ |a| x &lt;&lt; a }
682
- x #=&gt; [ [1,2,3], [4,5,6] ]
683
- </pre>
684
- </div>
685
- <div class="aka">
686
- This method is also aliased as
687
- <a href="Enumerable.html#M000498">each_by</a>
688
- </div>
689
- <div class="sourcecode">
690
- <p class="source-link">[ <a href="javascript:toggleSource('M000497_source')" id="l_M000497_source">show source</a> ]</p>
691
- <div id="M000497_source" class="dyn-source">
692
- <pre>
693
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_slice.rb, line 15</span>
694
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_slice</span>(<span class="ruby-identifier">step</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">yld</span>)
695
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">step</span>
696
- <span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">step</span>
697
- <span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
698
- <span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">cnt</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
699
- <span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
700
- <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-identifier">i</span><span class="ruby-operator">*</span><span class="ruby-identifier">cnt</span>,<span class="ruby-identifier">cnt</span>))
701
- }
702
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
703
- <span class="ruby-keyword kw">else</span>
704
- <span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">arity</span>.<span class="ruby-identifier">abs</span>
705
- <span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
706
- <span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">cnt</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
707
- <span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
708
- <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-identifier">i</span><span class="ruby-operator">*</span><span class="ruby-identifier">cnt</span>,<span class="ruby-identifier">cnt</span>))
709
- }
710
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
711
- <span class="ruby-keyword kw">end</span>
712
- <span class="ruby-keyword kw">end</span>
713
- </pre>
714
- </div>
715
- </div>
716
- </div>
717
- <div class="method">
718
- <div class="title">
719
- <a name="M000467"></a><b>elementwise</b>()
720
- </div>
721
- <div class="description">
722
- <p>
723
- Returns an elementwise Functor designed to make R-like elementwise
724
- operations possible.
725
- </p>
726
- <pre>
727
- [1,2].ew + 3 #=&gt; [4,5]
728
- [1,2].ew + [4,5] #=&gt; [5,7]
729
- [1,2].ew + [[4,5],3] #=&gt; [[5,7],[4,5]
730
- </pre>
731
- </div>
732
- <div class="aka">
733
- This method is also aliased as
734
- <a href="Enumerable.html#M000468">ew</a>
735
- </div>
736
- <div class="sourcecode">
737
- <p class="source-link">[ <a href="javascript:toggleSource('M000467_source')" id="l_M000467_source">show source</a> ]</p>
738
- <div id="M000467_source" class="dyn-source">
739
- <pre>
740
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/ew.rb, line 16</span>
741
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elementwise</span>
742
- <span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
743
- <span class="ruby-identifier">a</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
744
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Enumerable</span>)
745
- <span class="ruby-identifier">ln</span> = ( <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">length</span> )
746
- <span class="ruby-keyword kw">self</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ln</span>].<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ln</span>]).<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-identifier">b</span>) }
747
- <span class="ruby-comment cmt">#self[0...ln].zip(arg[0...1n]).collect{ |a,b| b ? a.send(op,b) : nil }</span>
748
- <span class="ruby-keyword kw">else</span>
749
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-identifier">arg</span>) }
750
- <span class="ruby-keyword kw">end</span>
751
- <span class="ruby-keyword kw">end</span>
752
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">flatten!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
753
- <span class="ruby-identifier">a</span>
754
- <span class="ruby-keyword kw">end</span>
755
- <span class="ruby-keyword kw">end</span>
756
- </pre>
757
- </div>
758
- </div>
759
- </div>
760
- <div class="method">
761
- <div class="title">
762
- <a name="M000499"></a><b>entropy</b>()
763
- </div>
764
- <div class="description">
765
- <p>
766
- Shannon&#8217;s entropy for an array - returns the average bits per symbol
767
- required to encode the array. Lower values mean less &quot;entropy&quot; -
768
- i.e. less unique information in the array.
769
- </p>
770
- <pre>
771
- %w{ a b c d e e e }.entropy #=&gt;
772
- </pre>
773
- </div>
774
- <div class="sourcecode">
775
- <p class="source-link">[ <a href="javascript:toggleSource('M000499_source')" id="l_M000499_source">show source</a> ]</p>
776
- <div id="M000499_source" class="dyn-source">
777
- <pre>
778
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/entropy.rb, line 15</span>
779
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>
780
- <span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
781
- <span class="ruby-identifier">probHash</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">probability</span>
782
- <span class="ruby-comment cmt"># h is the Shannon entropy of the array</span>
783
- <span class="ruby-identifier">h</span> = <span class="ruby-value">-1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">probHash</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>.<span class="ruby-identifier">to_f</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
784
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">probHash</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">*</span> (<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">probHash</span>[<span class="ruby-identifier">i</span>])<span class="ruby-operator">/</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2</span>.<span class="ruby-identifier">to_f</span>)))
785
- <span class="ruby-keyword kw">end</span>
786
- <span class="ruby-identifier">h</span>
787
- <span class="ruby-keyword kw">end</span>
788
- </pre>
789
- </div>
790
- </div>
791
- </div>
792
- <div class="method">
793
- <div class="title">
794
- <a name="M000484"></a><b>every</b>()
795
- </div>
796
- <div class="description">
797
- <p>
798
- Returns an elementwise Functor. This allows you to map a method on to every
799
- element.
800
- </p>
801
- <pre>
802
- [1,2,3].every + 3 #=&gt; [4,5,6]
803
-
804
- ['a','b','c'].every.upcase #=&gt; ['A','B','C']
805
- </pre>
806
- </div>
807
- <div class="sourcecode">
808
- <p class="source-link">[ <a href="javascript:toggleSource('M000484_source')" id="l_M000484_source">show source</a> ]</p>
809
- <div id="M000484_source" class="dyn-source">
810
- <pre>
811
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/every.rb, line 13</span>
812
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">every</span>
813
- <span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
814
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
815
- <span class="ruby-keyword kw">end</span>
816
- <span class="ruby-keyword kw">end</span>
817
- </pre>
818
- </div>
819
- </div>
820
- </div>
821
- <div class="method">
822
- <div class="title">
823
- <a name="M000468"></a><b>ew</b>()
824
- </div>
825
- <div class="description">
826
- <p>
827
- Alias for <a href="Enumerable.html#M000467">elementwise</a>
828
- </p>
829
- </div>
830
- </div>
831
- <div class="method">
832
- <div class="title">
833
- <a name="M000470"></a><b>filter_collect</b>( {|| ...}
834
- </div>
835
- <div class="description">
836
- <p>
837
- Collects/Maps and filters items out in one single step. You can use
838
- throw(:skip) in the supplied block to indicate that the current item should
839
- not end up in the resulting array.
840
- </p>
841
- <pre>
842
- # Return names of all person with an age of at least 18.
843
- persons.filter_collect do |person|
844
- throw(:skip) if person.age &lt; 18
845
- person.name
846
- end
847
- </pre>
848
- <p>
849
- Also see Enumerable#collect, Enumerable#find_all.
850
- </p>
851
- </div>
852
- <div class="aka">
853
- This method is also aliased as
854
- <a href="Enumerable.html#M000471">filter_map</a>
855
- </div>
856
- <div class="sourcecode">
857
- <p class="source-link">[ <a href="javascript:toggleSource('M000470_source')" id="l_M000470_source">show source</a> ]</p>
858
- <div id="M000470_source" class="dyn-source">
859
- <pre>
860
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/filter_collect.rb, line 18</span>
861
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filter_collect</span> <span class="ruby-comment cmt">#:yield:</span>
862
- <span class="ruby-identifier">result</span> = []
863
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
864
- <span class="ruby-identifier">catch</span>(<span class="ruby-identifier">:skip</span>) <span class="ruby-keyword kw">do</span>
865
- <span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
866
- <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">new_item</span>
867
- <span class="ruby-keyword kw">end</span>
868
- <span class="ruby-keyword kw">end</span>
869
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
870
- <span class="ruby-keyword kw">end</span>
871
- </pre>
872
- </div>
873
- </div>
874
- </div>
875
- <div class="method">
876
- <div class="title">
877
- <a name="M000471"></a><b>filter_map</b>(
878
- </div>
879
- <div class="description">
880
- <p>
881
- Alias for <a href="Enumerable.html#M000470">filter_collect</a>
882
- </p>
883
- </div>
884
- </div>
885
- <div class="method">
886
- <div class="title">
887
- <a name="M000466"></a><b>find_collisions</b>( ) {|| ...}
888
- </div>
889
- <div class="description">
890
- <p>
891
- Like commonality but returns an array if no block is given.
892
- </p>
893
- </div>
894
- <div class="sourcecode">
895
- <p class="source-link">[ <a href="javascript:toggleSource('M000466_source')" id="l_M000466_source">show source</a> ]</p>
896
- <div id="M000466_source" class="dyn-source">
897
- <pre>
898
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/find_collisions.rb, line 7</span>
899
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_collisions</span>( <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span> ) <span class="ruby-comment cmt">#:yield:</span>
900
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
901
- <span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span> )
902
- <span class="ruby-keyword kw">else</span>
903
- <span class="ruby-identifier">commonality</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
904
- <span class="ruby-keyword kw">end</span>
905
- <span class="ruby-keyword kw">end</span>
906
- </pre>
907
- </div>
908
- </div>
909
- </div>
910
- <div class="method">
911
- <div class="title">
912
- <a name="M000491"></a><b>frequency</b>()
913
- </div>
914
- <div class="description">
915
- <p>
916
- Generates a hash mapping each unique symbol in the array to the absolute
917
- frequency it appears.
918
- </p>
919
- </div>
920
- <div class="sourcecode">
921
- <p class="source-link">[ <a href="javascript:toggleSource('M000491_source')" id="l_M000491_source">show source</a> ]</p>
922
- <div id="M000491_source" class="dyn-source">
923
- <pre>
924
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/frequency.rb, line 8</span>
925
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">frequency</span>
926
- <span class="ruby-identifier">probs</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
927
- <span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">|</span>
928
- <span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
929
- <span class="ruby-keyword kw">end</span>
930
- <span class="ruby-identifier">probs</span>
931
- <span class="ruby-keyword kw">end</span>
932
- </pre>
933
- </div>
934
- </div>
935
- </div>
936
- <div class="method">
937
- <div class="title">
938
- <a name="M000469"></a><b>graph</b>(&amp;yld)
939
- </div>
940
- <div class="description">
941
- <p>
942
- Like <tt>map</tt>/<tt>collect</tt>, but it generates a <a
943
- href="Hash.html">Hash</a>. The block is expected to return two values: the
944
- key and the value for the new hash.
945
- </p>
946
- <pre>
947
- numbers = (1..3)
948
- squares = numbers.graph { |n| [n, n*n] } # { 1=&gt;1, 2=&gt;4, 3=&gt;9 }
949
- sq_roots = numbers.graph { |n| [n*n, n] } # { 1=&gt;1, 4=&gt;2, 9=&gt;3 }
950
- </pre>
951
- </div>
952
- <div class="sourcecode">
953
- <p class="source-link">[ <a href="javascript:toggleSource('M000469_source')" id="l_M000469_source">show source</a> ]</p>
954
- <div id="M000469_source" class="dyn-source">
955
- <pre>
956
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/graph.rb, line 22</span>
957
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">graph</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">yld</span>)
958
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">yld</span>
959
- <span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">kv</span><span class="ruby-operator">|</span>
960
- <span class="ruby-identifier">nk</span>, <span class="ruby-identifier">nv</span> = <span class="ruby-identifier">yld</span>[<span class="ruby-operator">*</span><span class="ruby-identifier">kv</span>]
961
- <span class="ruby-identifier">h</span>[<span class="ruby-identifier">nk</span>] = <span class="ruby-identifier">nv</span>
962
- <span class="ruby-identifier">h</span>
963
- <span class="ruby-keyword kw">end</span>
964
- <span class="ruby-keyword kw">else</span>
965
- <span class="ruby-constant">Hash</span>[<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">flatten</span>]
966
- <span class="ruby-keyword kw">end</span>
967
- <span class="ruby-keyword kw">end</span>
968
- </pre>
969
- </div>
970
- </div>
971
- </div>
972
- <div class="method">
973
- <div class="title">
974
- <a name="M000472"></a><b>ideal_entropy</b>()
975
- </div>
976
- <div class="description">
977
- <p>
978
- Returns the maximum possible Shannon entropy of the array with given size
979
- assuming that it is an &quot;order-0&quot; source (each element is selected
980
- independently of the next).
981
- </p>
982
- </div>
983
- <div class="sourcecode">
984
- <p class="source-link">[ <a href="javascript:toggleSource('M000472_source')" id="l_M000472_source">show source</a> ]</p>
985
- <div id="M000472_source" class="dyn-source">
986
- <pre>
987
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/ideal_entropy.rb, line 13</span>
988
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ideal_entropy</span>
989
- <span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
990
- <span class="ruby-identifier">unitProb</span> = <span class="ruby-value">1.0</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span>
991
- (<span class="ruby-value">-1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">unitProb</span> <span class="ruby-operator">*</span> <span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">unitProb</span>)<span class="ruby-operator">/</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2</span>.<span class="ruby-identifier">to_f</span>))
992
- <span class="ruby-keyword kw">end</span>
993
- </pre>
994
- </div>
995
- </div>
996
- </div>
997
- <div class="method">
998
- <div class="title">
999
- <a name="M000504"></a><b>map_if</b>(&amp;b)
1000
- </div>
1001
- <div class="description">
1002
- <p>
1003
- Alias for <a href="Enumerable.html#M000503">collect_if</a>
1004
- </p>
1005
- </div>
1006
- </div>
1007
- <div class="method">
1008
- <div class="title">
1009
- <a name="M000481"></a><b>map_with_counter</b>()
1010
- </div>
1011
- <div class="description">
1012
- <p>
1013
- Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
1014
- </p>
1015
- </div>
1016
- </div>
1017
- <div class="method">
1018
- <div class="title">
1019
- <a name="M000479"></a><b>map_with_index</b>()
1020
- </div>
1021
- <div class="description">
1022
- <p>
1023
- Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
1024
- </p>
1025
- </div>
1026
- </div>
1027
- <div class="method">
1028
- <div class="title">
1029
- <a name="M000506"></a><b>mode</b>()
1030
- </div>
1031
- <div class="description">
1032
- <p>
1033
- In Statistics mode is the value that occurs most frequently in a given set
1034
- of data.
1035
- </p>
1036
- </div>
1037
- <div class="sourcecode">
1038
- <p class="source-link">[ <a href="javascript:toggleSource('M000506_source')" id="l_M000506_source">show source</a> ]</p>
1039
- <div id="M000506_source" class="dyn-source">
1040
- <pre>
1041
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/mode.rb, line 7</span>
1042
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mode</span>
1043
- <span class="ruby-identifier">count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
1044
- <span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">count</span>[<span class="ruby-identifier">x</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> }
1045
- <span class="ruby-identifier">count</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span><span class="ruby-identifier">v</span>}.<span class="ruby-identifier">last</span>[<span class="ruby-value">0</span>]
1046
- <span class="ruby-keyword kw">end</span>
1047
- </pre>
1048
- </div>
1049
- </div>
1050
- </div>
1051
- <div class="method">
1052
- <div class="title">
1053
- <a name="M000488"></a><b>none?</b>( {|e| ...}
1054
- </div>
1055
- <div class="description">
1056
- <p>
1057
- Enumerable#none? is the logical opposite of the builtin method
1058
- Enumerable#any?. It returns <tt>true</tt> if and only if <em>none</em> of
1059
- the elements in the collection satisfy the predicate.
1060
- </p>
1061
- <p>
1062
- If no predicate is provided, Enumerable#none? returns <tt>true</tt> if and
1063
- only if <em>none</em> of the elements have a true value (i.e. not
1064
- <tt>nil</tt> or <tt>false</tt>).
1065
- </p>
1066
- <pre>
1067
- [].none? # true
1068
- [nil].none? # true
1069
- [5,8,9].none? # false
1070
- (1...10).none? { |n| n &lt; 0 } # true
1071
- (1...10).none? { |n| n &gt; 0 } # false
1072
- </pre>
1073
- </div>
1074
- <div class="sourcecode">
1075
- <p class="source-link">[ <a href="javascript:toggleSource('M000488_source')" id="l_M000488_source">show source</a> ]</p>
1076
- <div id="M000488_source" class="dyn-source">
1077
- <pre>
1078
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/none.rb, line 20</span>
1079
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">none?</span> <span class="ruby-comment cmt"># :yield: e</span>
1080
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
1081
- <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">e</span> }
1082
- <span class="ruby-keyword kw">else</span>
1083
- <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">any?</span>
1084
- <span class="ruby-keyword kw">end</span>
1085
- <span class="ruby-keyword kw">end</span>
1086
- </pre>
1087
- </div>
1088
- </div>
1089
- </div>
1090
- <div class="method">
1091
- <div class="title">
1092
- <a name="M000475"></a><b>nonuniq</b>()
1093
- </div>
1094
- <div class="sourcecode">
1095
- <p class="source-link">[ <a href="javascript:toggleSource('M000475_source')" id="l_M000475_source">show source</a> ]</p>
1096
- <div id="M000475_source" class="dyn-source">
1097
- <pre>
1098
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 7</span>
1099
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq</span>
1100
- <span class="ruby-identifier">h1</span> = {}
1101
- <span class="ruby-identifier">h2</span> = {}
1102
- <span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
1103
- <span class="ruby-identifier">h2</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>]
1104
- <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
1105
- }
1106
- <span class="ruby-identifier">h2</span>.<span class="ruby-identifier">keys</span>
1107
- <span class="ruby-keyword kw">end</span>
1108
- </pre>
1109
- </div>
1110
- </div>
1111
- </div>
1112
- <div class="method">
1113
- <div class="title">
1114
- <a name="M000476"></a><b>nonuniq!</b>()
1115
- </div>
1116
- <div class="sourcecode">
1117
- <p class="source-link">[ <a href="javascript:toggleSource('M000476_source')" id="l_M000476_source">show source</a> ]</p>
1118
- <div id="M000476_source" class="dyn-source">
1119
- <pre>
1120
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 17</span>
1121
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq!</span>
1122
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:replace</span>)
1123
- <span class="ruby-identifier">h1</span> = {}
1124
- <span class="ruby-identifier">h2</span> = {}
1125
- <span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
1126
- <span class="ruby-identifier">h2</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>]
1127
- <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
1128
- }
1129
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">h2</span>.<span class="ruby-identifier">keys</span>)
1130
- <span class="ruby-keyword kw">end</span>
1131
- </pre>
1132
- </div>
1133
- </div>
1134
- </div>
1135
- <div class="method">
1136
- <div class="title">
1137
- <a name="M000495"></a><b>occur</b>(n=nil) {|| ...}
1138
- </div>
1139
- <div class="description">
1140
- <p>
1141
- Returns an array of elements for the elements that occur n times. Or
1142
- according to the results of a given block.
1143
- </p>
1144
- <pre>
1145
- [1,1,2,3,3,4,5,5].occur(1) #=&gt; [2,4]
1146
- [1,1,2,3,3,4,5,5].occur(2) #=&gt; [1,3,5]
1147
- [1,1,2,3,3,4,5,5].occur(3) #=&gt; []
1148
-
1149
- [1,2,2,3,3,3].occur(1..1) #=&gt; [1]
1150
- [1,2,2,3,3,3].occur(2..3) #=&gt; [2,3]
1151
-
1152
- [1,1,2,3,3,4,5,5].occur { |n| n == 1 } #=&gt; [2,4]
1153
- [1,1,2,3,3,4,5,5].occur { |n| n &gt; 1 } #=&gt; [1,3,5]
1154
- </pre>
1155
- </div>
1156
- <div class="sourcecode">
1157
- <p class="source-link">[ <a href="javascript:toggleSource('M000495_source')" id="l_M000495_source">show source</a> ]</p>
1158
- <div id="M000495_source" class="dyn-source">
1159
- <pre>
1160
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/occur.rb, line 17</span>
1161
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">occur</span>(<span class="ruby-identifier">n</span>=<span class="ruby-keyword kw">nil</span>) <span class="ruby-comment cmt">#:yield:</span>
1162
- <span class="ruby-identifier">result</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> }
1163
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
1164
- <span class="ruby-identifier">key</span> = <span class="ruby-identifier">item</span>
1165
- <span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">item</span>
1166
- <span class="ruby-keyword kw">end</span>
1167
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
1168
- <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>) }
1169
- <span class="ruby-keyword kw">else</span>
1170
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span>
1171
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Range</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">n</span>
1172
- <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>) }
1173
- <span class="ruby-keyword kw">else</span>
1174
- <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">n</span> }
1175
- <span class="ruby-keyword kw">end</span>
1176
- <span class="ruby-keyword kw">end</span>
1177
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
1178
- <span class="ruby-keyword kw">end</span>
1179
- </pre>
1180
- </div>
1181
- </div>
1182
- </div>
1183
- <div class="method">
1184
- <div class="title">
1185
- <a name="M000487"></a><b>one?</b>( {|e| ...}
1186
- </div>
1187
- <div class="description">
1188
- <p>
1189
- Enumerable#one? returns <tt>true</tt> if and only if <em>exactly one</em>
1190
- element in the collection satisfies the given predicate.
1191
- </p>
1192
- <p>
1193
- If no predicate is provided, Enumerable#one? returns <tt>true</tt> if and
1194
- only if <em>exactly one</em> element has a true value (i.e. not
1195
- <tt>nil</tt> or <tt>false</tt>).
1196
- </p>
1197
- <pre>
1198
- [].one? # false
1199
- [nil].one? # false
1200
- [5].one? # true
1201
- [5,8,9].one? # false
1202
- (1...10).one? { |n| n == 5 } # true
1203
- (1...10).one? { |n| n &lt; 5 } # false
1204
- </pre>
1205
- </div>
1206
- <div class="sourcecode">
1207
- <p class="source-link">[ <a href="javascript:toggleSource('M000487_source')" id="l_M000487_source">show source</a> ]</p>
1208
- <div id="M000487_source" class="dyn-source">
1209
- <pre>
1210
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/one.rb, line 20</span>
1211
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span> <span class="ruby-comment cmt"># :yield: e</span>
1212
- <span class="ruby-identifier">matches</span> = <span class="ruby-value">0</span>
1213
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
1214
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
1215
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>)
1216
- <span class="ruby-identifier">matches</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
1217
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">matches</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
1218
- <span class="ruby-keyword kw">end</span>
1219
- <span class="ruby-keyword kw">end</span>
1220
- <span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">matches</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>)
1221
- <span class="ruby-keyword kw">else</span>
1222
- <span class="ruby-identifier">one?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> }
1223
- <span class="ruby-keyword kw">end</span>
1224
- <span class="ruby-keyword kw">end</span>
1225
- </pre>
1226
- </div>
1227
- </div>
1228
- </div>
1229
- <div class="method">
1230
- <div class="title">
1231
- <a name="M000474"></a><b>partition_by</b>( {|| ...}
1232
- </div>
1233
- <div class="description">
1234
- <p>
1235
- See Enumerable#partition for the background. <a
1236
- href="Enumerable.html#M000474">partition_by</a> is best explained by
1237
- example.
1238
- </p>
1239
- <pre>
1240
- (1..5).partition_by { |n| n % 3 }
1241
- #=&gt; { 0 =&gt; [3], 1 =&gt; [1, 4], 2 =&gt; [2,5] }
1242
-
1243
- [&quot;I had&quot;, 1, &quot;dollar and&quot;, 50, &quot;cents&quot;].partition_by { |e| e.class }
1244
- #=&gt; { String =&gt; [&quot;I had&quot;,&quot;dollar and&quot;,&quot;cents&quot;], Fixnum =&gt; [1,50] }
1245
- </pre>
1246
- <p>
1247
- <a href="Enumerable.html#M000474">partition_by</a> is used to group items
1248
- in a collection by something they have in common. The common factor is the
1249
- key in the resulting hash, the array of like elements is the value.
1250
- </p>
1251
- </div>
1252
- <div class="sourcecode">
1253
- <p class="source-link">[ <a href="javascript:toggleSource('M000474_source')" id="l_M000474_source">show source</a> ]</p>
1254
- <div id="M000474_source" class="dyn-source">
1255
- <pre>
1256
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/partition_by.rb, line 19</span>
1257
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partition_by</span> <span class="ruby-comment cmt">#:yield:</span>
1258
- <span class="ruby-identifier">result</span> = {}
1259
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
1260
- <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">e</span>
1261
- (<span class="ruby-identifier">result</span>[<span class="ruby-identifier">value</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span>
1262
- <span class="ruby-keyword kw">end</span>
1263
- <span class="ruby-identifier">result</span>
1264
- <span class="ruby-keyword kw">end</span>
1265
- </pre>
1266
- </div>
1267
- </div>
1268
- </div>
1269
- <div class="method">
1270
- <div class="title">
1271
- <a name="M000493"></a><b>permutation_number</b>(original_array=self.to_a.sort)
1272
- </div>
1273
- <div class="sourcecode">
1274
- <p class="source-link">[ <a href="javascript:toggleSource('M000493_source')" id="l_M000493_source">show source</a> ]</p>
1275
- <div id="M000493_source" class="dyn-source">
1276
- <pre>
1277
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 22</span>
1278
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">permutation_number</span>(<span class="ruby-identifier">original_array</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">sort</span>)
1279
- <span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
1280
- <span class="ruby-identifier">m</span> = <span class="ruby-value">1</span>
1281
- <span class="ruby-identifier">v</span> = <span class="ruby-value">0</span>
1282
- <span class="ruby-identifier">last_indicies</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
1283
- <span class="ruby-identifier">original_array</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
1284
- <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>
1285
- <span class="ruby-identifier">m</span> <span class="ruby-operator">*=</span> <span class="ruby-identifier">i</span>
1286
- <span class="ruby-identifier">done</span> = <span class="ruby-identifier">original_array</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">i</span>]
1287
- <span class="ruby-identifier">v</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">y</span><span class="ruby-operator">|</span> <span class="ruby-identifier">done</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">y</span>)}.<span class="ruby-identifier">rindex</span>(<span class="ruby-identifier">x</span>)
1288
- }
1289
- <span class="ruby-identifier">v</span>
1290
- <span class="ruby-keyword kw">end</span>
1291
- </pre>
1292
- </div>
1293
- </div>
1294
- </div>
1295
- <div class="method">
1296
- <div class="title">
1297
- <a name="M000492"></a><b>permute</b>(number)
1298
- </div>
1299
- <div class="sourcecode">
1300
- <p class="source-link">[ <a href="javascript:toggleSource('M000492_source')" id="l_M000492_source">show source</a> ]</p>
1301
- <div id="M000492_source" class="dyn-source">
1302
- <pre>
1303
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 6</span>
1304
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">permute</span>(<span class="ruby-identifier">number</span>)
1305
- <span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
1306
- <span class="ruby-identifier">out</span> = <span class="ruby-identifier">arr</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">0</span>]
1307
- <span class="ruby-identifier">nextfactor</span> = <span class="ruby-identifier">factor</span> = <span class="ruby-value">1</span>
1308
- <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
1309
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
1310
- <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">:</span> <span class="ruby-keyword kw">next</span>
1311
- <span class="ruby-keyword kw">else</span>
1312
- <span class="ruby-identifier">nextfactor</span> = <span class="ruby-identifier">factor</span> <span class="ruby-operator">*</span> (<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
1313
- <span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">number</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">nextfactor</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">factor</span>, <span class="ruby-identifier">x</span>)
1314
- <span class="ruby-identifier">factor</span> = <span class="ruby-identifier">nextfactor</span>
1315
- <span class="ruby-keyword kw">end</span>
1316
- }
1317
- <span class="ruby-identifier">out</span>
1318
- <span class="ruby-keyword kw">end</span>
1319
- </pre>
1320
- </div>
1321
- </div>
1322
- </div>
1323
- <div class="method">
1324
- <div class="title">
1325
- <a name="M000477"></a><b>probability</b>()
1326
- </div>
1327
- <div class="description">
1328
- <p>
1329
- Generates a hash mapping each unique symbol in the array to the relative
1330
- frequency, i.e. the probablity, of it appearence.
1331
- </p>
1332
- </div>
1333
- <div class="sourcecode">
1334
- <p class="source-link">[ <a href="javascript:toggleSource('M000477_source')" id="l_M000477_source">show source</a> ]</p>
1335
- <div id="M000477_source" class="dyn-source">
1336
- <pre>
1337
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/probability.rb, line 10</span>
1338
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">probability</span>
1339
- <span class="ruby-identifier">probs</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span><span class="ruby-value">.0</span>)
1340
- <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
1341
- <span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">|</span>
1342
- <span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
1343
- <span class="ruby-identifier">size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
1344
- <span class="ruby-keyword kw">end</span>
1345
- <span class="ruby-identifier">probs</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">/=</span> <span class="ruby-identifier">size</span> }
1346
- <span class="ruby-identifier">probs</span>
1347
- <span class="ruby-keyword kw">end</span>
1348
- </pre>
1349
- </div>
1350
- </div>
1351
- </div>
1352
- <div class="method">
1353
- <div class="title">
1354
- <a name="M000489"></a><b>project</b>(&amp;block)
1355
- </div>
1356
- <div class="sourcecode">
1357
- <p class="source-link">[ <a href="javascript:toggleSource('M000489_source')" id="l_M000489_source">show source</a> ]</p>
1358
- <div id="M000489_source" class="dyn-source">
1359
- <pre>
1360
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/project.rb, line 7</span>
1361
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">project</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
1362
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }
1363
- <span class="ruby-keyword kw">end</span>
1364
- </pre>
1365
- </div>
1366
- </div>
1367
- </div>
1368
- <div class="method">
1369
- <div class="title">
1370
- <a name="M000482"></a><b>to_h</b>( &amp;blk )
1371
- </div>
1372
- <div class="description">
1373
- <p>
1374
- Produces a hash from an <a href="Enumerable.html">Enumerable</a> with index
1375
- for keys.
1376
- </p>
1377
- <pre>
1378
- enu = 'a'..'b'
1379
- enu.to_h #=&gt; { 0=&gt;'a', 1=&gt;'b' }
1380
- </pre>
1381
- <p>
1382
- If a block is passed, the hash values will be set by calling the block with
1383
- the enumerated element and it&#8217;s counter.
1384
- </p>
1385
- <pre>
1386
- enu = 'a'..'b'
1387
- enu.to_h{ |e,i| e } #=&gt; { 0=&gt;'a', 1=&gt;'b' }
1388
- </pre>
1389
- <p>
1390
- See also <a href="Enumerable.html#M000469">graph</a>.
1391
- </p>
1392
- </div>
1393
- <div class="sourcecode">
1394
- <p class="source-link">[ <a href="javascript:toggleSource('M000482_source')" id="l_M000482_source">show source</a> ]</p>
1395
- <div id="M000482_source" class="dyn-source">
1396
- <pre>
1397
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/to_h.rb, line 18</span>
1398
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>( <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span> )
1399
- <span class="ruby-identifier">h</span> = {}
1400
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
1401
- <span class="ruby-identifier">each_with_index</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span>) }
1402
- <span class="ruby-keyword kw">else</span>
1403
- <span class="ruby-identifier">each_with_index</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">e</span> }
1404
- <span class="ruby-keyword kw">end</span>
1405
- <span class="ruby-identifier">h</span>
1406
- <span class="ruby-keyword kw">end</span>
1407
- </pre>
1408
- </div>
1409
- </div>
1410
- </div>
1411
- <div class="method">
1412
- <div class="title">
1413
- <a name="M000500"></a><b>uniq_by</b>( {|| ...}
1414
- </div>
1415
- <div class="description">
1416
- <p>
1417
- Like uniq, but determines uniqueness based on a given block.
1418
- </p>
1419
- <pre>
1420
- (-5..5).to_a.uniq_by {|i| i*i }
1421
- </pre>
1422
- <p>
1423
- produces
1424
- </p>
1425
- <pre>
1426
- [-5, -4, -3, -2, -1, 0]
1427
- </pre>
1428
- </div>
1429
- <div class="sourcecode">
1430
- <p class="source-link">[ <a href="javascript:toggleSource('M000500_source')" id="l_M000500_source">show source</a> ]</p>
1431
- <div id="M000500_source" class="dyn-source">
1432
- <pre>
1433
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/uniq_by.rb, line 12</span>
1434
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uniq_by</span> <span class="ruby-comment cmt">#:yield:</span>
1435
- <span class="ruby-identifier">h</span> = {}; <span class="ruby-identifier">inject</span>([]) {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)] <span class="ruby-operator">||=</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">x</span>}
1436
- <span class="ruby-keyword kw">end</span>
1437
- </pre>
1438
- </div>
1439
- </div>
1440
- </div>
1441
- <div class="method">
1442
- <div class="title">
1443
- <a name="M000473"></a><b>where</b>(&amp;block)
1444
- </div>
1445
- <div class="sourcecode">
1446
- <p class="source-link">[ <a href="javascript:toggleSource('M000473_source')" id="l_M000473_source">show source</a> ]</p>
1447
- <div id="M000473_source" class="dyn-source">
1448
- <pre>
1449
- <span class="ruby-comment cmt"># File lib/facets/core/enumerable/where.rb, line 7</span>
1450
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">where</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
1451
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }
1452
- <span class="ruby-keyword kw">end</span>
1453
- </pre>
1454
- </div>
1455
- </div>
1456
- </div>
1457
- </div>
1458
-
1459
- </div>
1460
-
1461
- </body>
1462
- </html>