facets 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1787) hide show
  1. data/CHANGELOG +9 -2
  2. data/ProjectInfo +15 -22
  3. data/Rakefile +17 -15
  4. data/TODO +2 -29
  5. data/lib/facet/array.rb +33 -1
  6. data/lib/facet/array/at_rand.rb +52 -1
  7. data/lib/facet/array/body.rb +2 -1
  8. data/lib/facet/array/delete_unless.rb +35 -1
  9. data/lib/facet/array/delete_values.rb +38 -1
  10. data/lib/facet/array/delete_values_at.rb +57 -1
  11. data/lib/facet/array/each_with_key.rb +9 -1
  12. data/lib/facet/array/first.rb +84 -1
  13. data/lib/facet/array/foot.rb +2 -1
  14. data/lib/facet/array/head.rb +80 -1
  15. data/lib/facet/array/last.rb +2 -1
  16. data/lib/facet/array/last_index.rb +35 -1
  17. data/lib/facet/array/merge.rb +40 -1
  18. data/lib/facet/array/mid.rb +50 -1
  19. data/lib/facet/array/middle.rb +45 -1
  20. data/lib/facet/array/op_fetch.rb +40 -1
  21. data/lib/facet/array/op_store.rb +47 -1
  22. data/lib/facet/array/pick.rb +68 -1
  23. data/lib/facet/array/pos.rb +39 -1
  24. data/lib/facet/array/pull.rb +37 -1
  25. data/lib/facet/array/rand_index.rb +30 -1
  26. data/lib/facet/array/rand_subset.rb +56 -1
  27. data/lib/facet/array/range.rb +47 -1
  28. data/lib/facet/array/rotate.rb +67 -1
  29. data/lib/facet/array/select.rb +37 -1
  30. data/lib/facet/array/shuffle.rb +66 -1
  31. data/lib/facet/array/slap.rb +37 -1
  32. data/lib/facet/array/store.rb +7 -1
  33. data/lib/facet/array/tail.rb +2 -1
  34. data/lib/facet/array/thru.rb +38 -1
  35. data/lib/facet/array/to_b.rb +31 -1
  36. data/lib/facet/array/to_h.rb +57 -1
  37. data/lib/facet/array/to_hash.rb +46 -1
  38. data/lib/facet/array/unzip.rb +20 -1
  39. data/lib/facet/binding.rb +14 -1
  40. data/lib/facet/binding/__DIR__.rb +2 -1
  41. data/lib/facet/binding/__FILE__.rb +2 -1
  42. data/lib/facet/binding/__LINE__.rb +58 -1
  43. data/lib/facet/binding/call_stack.rb +42 -1
  44. data/lib/facet/binding/called.rb +41 -1
  45. data/lib/facet/binding/caller.rb +42 -1
  46. data/lib/facet/binding/defined.rb +41 -1
  47. data/lib/facet/binding/eval.rb +42 -1
  48. data/lib/facet/binding/local_variables.rb +45 -1
  49. data/lib/facet/binding/method_name.rb +48 -1
  50. data/lib/facet/binding/op_fetch.rb +45 -1
  51. data/lib/facet/binding/op_store.rb +46 -1
  52. data/lib/facet/binding/self.rb +41 -1
  53. data/lib/facet/binding/self/of_caller.rb +122 -1
  54. data/lib/facet/class.rb +5 -1
  55. data/lib/facet/class/by_name.rb +1 -1
  56. data/lib/facet/class/descendents.rb +44 -1
  57. data/lib/facet/class/remove_descendents.rb +46 -1
  58. data/lib/facet/class/remove_subclasses.rb +2 -1
  59. data/lib/facet/class/subclasses.rb +2 -1
  60. data/lib/facet/comparable.rb +5 -1
  61. data/lib/facet/comparable/at_least.rb +53 -1
  62. data/lib/facet/comparable/at_most.rb +2 -1
  63. data/lib/facet/comparable/cap.rb +2 -1
  64. data/lib/facet/comparable/clip.rb +72 -1
  65. data/lib/facet/comparable/cmp.rb +38 -1
  66. data/lib/facet/continuation.rb +1 -1
  67. data/lib/facet/continuation/self/create.rb +71 -1
  68. data/lib/facet/date.rb +0 -1
  69. data/lib/facet/date/days_in_month.rb +42 -1
  70. data/lib/facet/date/days_of_month.rb +34 -1
  71. data/lib/facet/date/stamp.rb +52 -1
  72. data/lib/facet/date/to_date.rb +36 -1
  73. data/lib/facet/date/to_s.rb +33 -1
  74. data/lib/facet/date/to_time.rb +36 -1
  75. data/lib/facet/dir.rb +4 -1
  76. data/lib/facet/dir/self/ancestor.rb +33 -1
  77. data/lib/facet/dir/self/ascend.rb +56 -1
  78. data/lib/facet/dir/self/ls_r.rb +76 -1
  79. data/lib/facet/dir/self/recurse.rb +2 -1
  80. data/lib/facet/enumerable.rb +38 -1
  81. data/lib/facet/enumerable/collect_with_counter.rb +2 -1
  82. data/lib/facet/enumerable/collect_with_index.rb +51 -1
  83. data/lib/facet/enumerable/commonality.rb +63 -1
  84. data/lib/facet/enumerable/compact_collect.rb +50 -1
  85. data/lib/facet/enumerable/compact_map.rb +2 -1
  86. data/lib/facet/enumerable/cross.rb +44 -1
  87. data/lib/facet/enumerable/each_by.rb +2 -1
  88. data/lib/facet/enumerable/each_combination.rb +59 -1
  89. data/lib/facet/enumerable/each_pair.rb +50 -1
  90. data/lib/facet/enumerable/each_permutation.rb +2 -1
  91. data/lib/facet/enumerable/each_slice.rb +131 -1
  92. data/lib/facet/enumerable/each_unique_pair.rb +66 -1
  93. data/lib/facet/enumerable/each_with_counter.rb +8 -1
  94. data/lib/facet/enumerable/elementwise.rb +2 -1
  95. data/lib/facet/enumerable/entropy.rb +52 -1
  96. data/lib/facet/enumerable/every.rb +65 -1
  97. data/lib/facet/enumerable/ew.rb +64 -1
  98. data/lib/facet/enumerable/filter_collect.rb +58 -1
  99. data/lib/facet/enumerable/filter_map.rb +2 -1
  100. data/lib/facet/enumerable/find_collisions.rb +41 -1
  101. data/lib/facet/enumerable/frequency.rb +39 -1
  102. data/lib/facet/enumerable/graph.rb +59 -1
  103. data/lib/facet/enumerable/ideal_entropy.rb +49 -1
  104. data/lib/facet/enumerable/map_with_counter.rb +2 -1
  105. data/lib/facet/enumerable/map_with_index.rb +2 -1
  106. data/lib/facet/enumerable/none.rb +56 -1
  107. data/lib/facet/enumerable/nonuniq.rb +39 -1
  108. data/lib/facet/enumerable/occur.rb +62 -1
  109. data/lib/facet/enumerable/one.rb +65 -1
  110. data/lib/facet/enumerable/op_pow.rb +38 -1
  111. data/lib/facet/enumerable/partition_by.rb +55 -1
  112. data/lib/facet/enumerable/permute.rb +135 -0
  113. data/lib/facet/enumerable/probability.rb +59 -1
  114. data/lib/facet/enumerable/project.rb +11 -1
  115. data/lib/facet/enumerable/self/combinations.rb +68 -1
  116. data/lib/facet/enumerable/self/cross.rb +79 -1
  117. data/lib/facet/enumerable/to_h.rb +50 -1
  118. data/lib/facet/enumerable/uniq_by.rb +39 -1
  119. data/lib/facet/enumerable/where.rb +12 -1
  120. data/lib/facet/file.rb +5 -1
  121. data/lib/facet/file/self/create.rb +52 -1
  122. data/lib/facet/file/self/open_as_string.rb +81 -1
  123. data/lib/facet/file/self/read_list.rb +47 -1
  124. data/lib/facet/file/self/sanitize.rb +50 -1
  125. data/lib/facet/file/self/split_all.rb +36 -1
  126. data/lib/facet/fileutils.rb +0 -1
  127. data/lib/facet/fileutils/head.rb +2 -1
  128. data/lib/facet/fileutils/safe_ln.rb +38 -1
  129. data/lib/facet/fileutils/slice.rb +152 -1
  130. data/lib/facet/fileutils/split_all.rb +29 -1
  131. data/lib/facet/fileutils/tail.rb +2 -1
  132. data/lib/facet/fileutils/wc.rb +128 -1
  133. data/lib/facet/fileutils/whereis.rb +76 -1
  134. data/lib/facet/fileutils/which.rb +117 -1
  135. data/lib/facet/float.rb +3 -1
  136. data/lib/facet/float/approx.rb +42 -1
  137. data/lib/facet/float/round_at.rb +72 -1
  138. data/lib/facet/float/round_to.rb +73 -1
  139. data/lib/facet/hash.rb +40 -1
  140. data/lib/facet/hash/alias.rb +54 -1
  141. data/lib/facet/hash/assert_has_keys.rb +38 -1
  142. data/lib/facet/hash/assert_has_only_keys.rb +38 -1
  143. data/lib/facet/hash/at.rb +26 -1
  144. data/lib/facet/hash/collate.rb +53 -1
  145. data/lib/facet/hash/delete_unless.rb +15 -1
  146. data/lib/facet/hash/each.rb +61 -1
  147. data/lib/facet/hash/each_with_index.rb +35 -1
  148. data/lib/facet/hash/each_with_key.rb +32 -1
  149. data/lib/facet/hash/graph.rb +31 -1
  150. data/lib/facet/hash/has_keys.rb +37 -1
  151. data/lib/facet/hash/has_only_keys.rb +37 -1
  152. data/lib/facet/hash/inverse.rb +51 -1
  153. data/lib/facet/hash/join.rb +19 -1
  154. data/lib/facet/hash/keys_to_iv.rb +60 -1
  155. data/lib/facet/hash/keys_to_s.rb +80 -1
  156. data/lib/facet/hash/keys_to_sym.rb +91 -1
  157. data/lib/facet/hash/op_fetch.rb +146 -1
  158. data/lib/facet/hash/op_lshift.rb +28 -1
  159. data/lib/facet/hash/op_store.rb +2 -1
  160. data/lib/facet/hash/rand_key.rb +47 -1
  161. data/lib/facet/hash/rand_pair.rb +50 -1
  162. data/lib/facet/hash/rand_value.rb +60 -1
  163. data/lib/facet/hash/replace_each.rb +33 -1
  164. data/lib/facet/hash/self/zipnew.rb +37 -1
  165. data/lib/facet/hash/shuffle.rb +53 -1
  166. data/lib/facet/hash/slice.rb +33 -1
  167. data/lib/facet/hash/stringify_keys.rb +2 -1
  168. data/lib/facet/hash/swap.rb +36 -1
  169. data/lib/facet/hash/swapkey.rb +44 -1
  170. data/lib/facet/hash/symoblize_keys.rb +2 -1
  171. data/lib/facet/hash/to_h.rb +35 -1
  172. data/lib/facet/hash/to_ostruct.rb +40 -1
  173. data/lib/facet/hash/to_ostruct_recurse.rb +45 -1
  174. data/lib/facet/hash/traverse.rb +63 -1
  175. data/lib/facet/hash/update_each.rb +43 -1
  176. data/lib/facet/hash/update_keys.rb +31 -1
  177. data/lib/facet/hash/update_values.rb +32 -1
  178. data/lib/facet/hash/variablize_keys.rb +2 -1
  179. data/lib/facet/hash/weave.rb +88 -1
  180. data/lib/facet/integer.rb +8 -1
  181. data/lib/facet/integer/even.rb +2 -1
  182. data/lib/facet/integer/fac.rb +2 -0
  183. data/lib/facet/integer/fact.rb +2 -1
  184. data/lib/facet/integer/factorial.rb +61 -1
  185. data/lib/facet/integer/multiple.rb +69 -1
  186. data/lib/facet/integer/odd.rb +2 -1
  187. data/lib/facet/integer/ordinal.rb +41 -1
  188. data/lib/facet/integer/times_collect.rb +39 -1
  189. data/lib/facet/integer/times_map.rb +2 -1
  190. data/lib/facet/kernel.rb +65 -1
  191. data/lib/facet/kernel/__DIR__.rb +11 -0
  192. data/lib/facet/kernel/__class__.rb +31 -1
  193. data/lib/facet/kernel/__meta__.rb +28 -1
  194. data/lib/facet/kernel/adhoc.rb +11 -0
  195. data/lib/facet/kernel/as.rb +91 -1
  196. data/lib/facet/kernel/assign_from.rb +82 -1
  197. data/lib/facet/kernel/assign_with.rb +75 -1
  198. data/lib/facet/kernel/autoreload.rb +46 -1
  199. data/lib/facet/kernel/autoreload_glob.rb +36 -1
  200. data/lib/facet/kernel/bool.rb +77 -1
  201. data/lib/facet/kernel/bug.rb +39 -1
  202. data/lib/facet/kernel/call_stack.rb +59 -1
  203. data/lib/facet/kernel/called.rb +40 -1
  204. data/lib/facet/kernel/complete.rb +6 -1
  205. data/lib/facet/kernel/constant.rb +52 -1
  206. data/lib/facet/kernel/copy.rb +48 -1
  207. data/lib/facet/kernel/deep_copy.rb +49 -1
  208. data/lib/facet/kernel/demo.rb +46 -1
  209. data/lib/facet/kernel/eigenclass.rb +17 -1
  210. data/lib/facet/kernel/false.rb +2 -1
  211. data/lib/facet/kernel/fn.rb +33 -1
  212. data/lib/facet/kernel/generate_method_name.rb +39 -1
  213. data/lib/facet/kernel/get_by_id.rb +33 -1
  214. data/lib/facet/kernel/here.rb +34 -1
  215. data/lib/facet/kernel/in.rb +35 -1
  216. data/lib/facet/kernel/instance_assign.rb +25 -1
  217. data/lib/facet/kernel/instvar.rb +13 -1
  218. data/lib/facet/kernel/is.rb +5 -1
  219. data/lib/facet/kernel/maybe.rb +41 -1
  220. data/lib/facet/kernel/me.rb +17 -1
  221. data/lib/facet/kernel/meta.rb +2 -1
  222. data/lib/facet/kernel/metaclass.rb +42 -1
  223. data/lib/facet/kernel/method.rb +76 -1
  224. data/lib/facet/kernel/method_name.rb +49 -1
  225. data/lib/facet/kernel/methods.rb +79 -1
  226. data/lib/facet/kernel/nack.rb +12 -1
  227. data/lib/facet/kernel/new.rb +40 -1
  228. data/lib/facet/kernel/object_class.rb +31 -1
  229. data/lib/facet/kernel/object_hexid.rb +35 -1
  230. data/lib/facet/kernel/op_esc.rb +37 -1
  231. data/lib/facet/kernel/own.rb +17 -1
  232. data/lib/facet/kernel/p.rb +12 -1
  233. data/lib/facet/kernel/require_all.rb +44 -1
  234. data/lib/facet/kernel/require_esc.rb +42 -1
  235. data/lib/facet/kernel/require_facet.rb +41 -1
  236. data/lib/facet/kernel/require_local.rb +25 -1
  237. data/lib/facet/kernel/resc.rb +32 -1
  238. data/lib/facet/kernel/returning.rb +49 -1
  239. data/lib/facet/kernel/send_as.rb +34 -1
  240. data/lib/facet/kernel/set_from.rb +69 -1
  241. data/lib/facet/kernel/set_with.rb +74 -1
  242. data/lib/facet/kernel/silence_warnings.rb +2 -1
  243. data/lib/facet/kernel/silently.rb +41 -1
  244. data/lib/facet/kernel/singleton.rb +47 -1
  245. data/lib/facet/kernel/superior.rb +53 -1
  246. data/lib/facet/kernel/supermethod.rb +44 -1
  247. data/lib/facet/kernel/this.rb +33 -1
  248. data/lib/facet/kernel/to_b.rb +41 -1
  249. data/lib/facet/kernel/to_bool.rb +47 -1
  250. data/lib/facet/kernel/true.rb +2 -1
  251. data/lib/facet/kernel/unuri.rb +2 -1
  252. data/lib/facet/kernel/uri.rb +38 -1
  253. data/lib/facet/kernel/val.rb +52 -1
  254. data/lib/facet/kernel/warn_with_line.rb +30 -1
  255. data/lib/facet/kernel/with_accessor.rb +94 -1
  256. data/lib/facet/kernel/with_reader.rb +2 -1
  257. data/lib/facet/kernel/with_writer.rb +2 -1
  258. data/lib/facet/logger.rb +0 -1
  259. data/lib/facet/logger/format.rb +28 -1
  260. data/lib/facet/logger/format_message.rb +1 -1
  261. data/lib/facet/matchdata.rb +3 -1
  262. data/lib/facet/matchdata/match.rb +37 -1
  263. data/lib/facet/matchdata/matchset.rb +2 -1
  264. data/lib/facet/matchdata/matchtree.rb +62 -1
  265. data/lib/facet/module.rb +40 -1
  266. data/lib/facet/module/abstract.rb +50 -1
  267. data/lib/facet/module/alias_module_function.rb +57 -1
  268. data/lib/facet/module/ancestor.rb +38 -1
  269. data/lib/facet/module/attr.rb +23 -1
  270. data/lib/facet/module/attr_setter.rb +48 -1
  271. data/lib/facet/module/attr_tester.rb +56 -1
  272. data/lib/facet/module/basename.rb +39 -1
  273. data/lib/facet/module/by_name.rb +68 -1
  274. data/lib/facet/module/cattr_accessor.rb +141 -1
  275. data/lib/facet/module/cattr_reader.rb +2 -1
  276. data/lib/facet/module/cattr_writer.rb +2 -1
  277. data/lib/facet/module/clone_removing.rb +2 -1
  278. data/lib/facet/module/clone_renaming.rb +2 -1
  279. data/lib/facet/module/clone_using.rb +87 -1
  280. data/lib/facet/module/dirname.rb +42 -1
  281. data/lib/facet/module/equate_on.rb +70 -1
  282. data/lib/facet/module/generate_instance_method_name.rb +47 -1
  283. data/lib/facet/module/include_as.rb +102 -1
  284. data/lib/facet/module/initializer.rb +65 -1
  285. data/lib/facet/module/instance_methods.rb +186 -1
  286. data/lib/facet/module/integrate.rb +51 -1
  287. data/lib/facet/module/is.rb +34 -1
  288. data/lib/facet/module/memoize.rb +95 -1
  289. data/lib/facet/module/modspace.rb +43 -1
  290. data/lib/facet/module/namespace.rb +61 -1
  291. data/lib/facet/module/nesting.rb +45 -1
  292. data/lib/facet/module/redef.rb +31 -1
  293. data/lib/facet/module/redefine_method.rb +57 -1
  294. data/lib/facet/module/redirect.rb +30 -1
  295. data/lib/facet/module/redirect_method.rb +64 -1
  296. data/lib/facet/module/remove.rb +29 -1
  297. data/lib/facet/module/rename.rb +31 -1
  298. data/lib/facet/module/rename_method.rb +38 -1
  299. data/lib/facet/module/revisal.rb +49 -1
  300. data/lib/facet/module/shadow_all.rb +17 -1
  301. data/lib/facet/module/shadow_method.rb +42 -1
  302. data/lib/facet/module/sort_on.rb +73 -1
  303. data/lib/facet/module/undef.rb +29 -1
  304. data/lib/facet/module/wrap.rb +30 -1
  305. data/lib/facet/module/wrap_method.rb +48 -1
  306. data/lib/facet/nilclass.rb +7 -1
  307. data/lib/facet/nilclass/empty.rb +32 -1
  308. data/lib/facet/nilclass/include.rb +32 -1
  309. data/lib/facet/nilclass/length.rb +2 -1
  310. data/lib/facet/nilclass/op_fetch.rb +37 -1
  311. data/lib/facet/nilclass/size.rb +44 -1
  312. data/lib/facet/nilclass/to_f.rb +32 -1
  313. data/lib/facet/nilclass/to_h.rb +33 -1
  314. data/lib/facet/numeric.rb +5 -1
  315. data/lib/facet/numeric/ceil_multiple.rb +40 -1
  316. data/lib/facet/numeric/pred.rb +2 -1
  317. data/lib/facet/numeric/succ.rb +69 -1
  318. data/lib/facet/numeric/to_b.rb +38 -1
  319. data/lib/facet/ostruct.rb +0 -1
  320. data/lib/facet/ostruct/__merge__.rb +52 -1
  321. data/lib/facet/ostruct/__table__.rb +17 -1
  322. data/lib/facet/ostruct/__update__.rb +45 -1
  323. data/lib/facet/ostruct/op_fetch.rb +40 -1
  324. data/lib/facet/ostruct/op_store.rb +42 -1
  325. data/lib/facet/ostruct/to_h.rb +8 -1
  326. data/lib/facet/pathname.rb +2 -1
  327. data/lib/facet/pathname/ascend.rb +22 -1
  328. data/lib/facet/pathname/descend.rb +20 -1
  329. data/lib/facet/proc.rb +3 -1
  330. data/lib/facet/proc/compose.rb +62 -1
  331. data/lib/facet/proc/op_mul.rb +2 -1
  332. data/lib/facet/proc/to_method.rb +74 -1
  333. data/lib/facet/range.rb +4 -1
  334. data/lib/facet/range/to_r.rb +32 -1
  335. data/lib/facet/range/to_range.rb +36 -1
  336. data/lib/facet/range/umbrella.rb +67 -1
  337. data/lib/facet/range/within.rb +44 -1
  338. data/lib/facet/regexp.rb +3 -1
  339. data/lib/facet/regexp/arity.rb +41 -1
  340. data/lib/facet/regexp/to_re.rb +38 -1
  341. data/lib/facet/regexp/to_regexp.rb +36 -1
  342. data/lib/facet/string.rb +86 -1
  343. data/lib/facet/string/align_center.rb +87 -1
  344. data/lib/facet/string/align_left.rb +2 -1
  345. data/lib/facet/string/align_right.rb +2 -1
  346. data/lib/facet/string/at.rb +8 -1
  347. data/lib/facet/string/at_rand.rb +65 -1
  348. data/lib/facet/string/basename.rb +48 -1
  349. data/lib/facet/string/blank.rb +36 -1
  350. data/lib/facet/string/bracket.rb +70 -1
  351. data/lib/facet/string/brief.rb +33 -1
  352. data/lib/facet/string/bytes.rb +19 -1
  353. data/lib/facet/string/camelcase.rb +58 -1
  354. data/lib/facet/string/camelize.rb +35 -1
  355. data/lib/facet/string/capitalized.rb +38 -1
  356. data/lib/facet/string/chars.rb +34 -1
  357. data/lib/facet/string/cmp.rb +43 -1
  358. data/lib/facet/string/demodulize.rb +40 -1
  359. data/lib/facet/string/dequote.rb +29 -1
  360. data/lib/facet/string/downcase.rb +37 -1
  361. data/lib/facet/string/dresner.rb +49 -1
  362. data/lib/facet/string/each_char.rb +35 -1
  363. data/lib/facet/string/each_word.rb +50 -1
  364. data/lib/facet/string/ends_with.rb +2 -1
  365. data/lib/facet/string/first.rb +94 -1
  366. data/lib/facet/string/first_char.rb +20 -1
  367. data/lib/facet/string/fold.rb +67 -1
  368. data/lib/facet/string/format.rb +17 -1
  369. data/lib/facet/string/frequency.rb +39 -1
  370. data/lib/facet/string/humanize.rb +31 -1
  371. data/lib/facet/string/indent.rb +68 -1
  372. data/lib/facet/string/index_all.rb +40 -1
  373. data/lib/facet/string/last.rb +94 -1
  374. data/lib/facet/string/last_char.rb +22 -1
  375. data/lib/facet/string/line_wrap.rb +77 -1
  376. data/lib/facet/string/lines.rb +33 -1
  377. data/lib/facet/string/lowercase.rb +32 -1
  378. data/lib/facet/string/margin.rb +138 -1
  379. data/lib/facet/string/mscan.rb +42 -1
  380. data/lib/facet/string/natcmp.rb +108 -1
  381. data/lib/facet/string/nchar.rb +45 -1
  382. data/lib/facet/string/ordinal.rb +16 -1
  383. data/lib/facet/string/plural.rb +2 -1
  384. data/lib/facet/string/pop.rb +54 -1
  385. data/lib/facet/string/probability.rb +34 -1
  386. data/lib/facet/string/pull.rb +17 -1
  387. data/lib/facet/string/push.rb +44 -1
  388. data/lib/facet/string/quote.rb +68 -1
  389. data/lib/facet/string/rand_byte.rb +55 -1
  390. data/lib/facet/string/rand_index.rb +29 -1
  391. data/lib/facet/string/range.rb +37 -1
  392. data/lib/facet/string/range_all.rb +48 -1
  393. data/lib/facet/string/range_of_line.rb +42 -1
  394. data/lib/facet/string/regesc.rb +32 -0
  395. data/lib/facet/string/self/format.rb +17 -1
  396. data/lib/facet/string/self/interpolate.rb +31 -1
  397. data/lib/facet/string/self/patterns.rb +51 -1
  398. data/lib/facet/string/self/rand_letter.rb +34 -1
  399. data/lib/facet/string/self/random.rb +36 -1
  400. data/lib/facet/string/shatter.rb +45 -1
  401. data/lib/facet/string/shift.rb +42 -1
  402. data/lib/facet/string/shuffle.rb +42 -1
  403. data/lib/facet/string/similarity.rb +108 -1
  404. data/lib/facet/string/singular.rb +117 -1
  405. data/lib/facet/string/slap.rb +44 -1
  406. data/lib/facet/string/soundex.rb +102 -1
  407. data/lib/facet/string/starts_with.rb +24 -1
  408. data/lib/facet/string/succ.rb +38 -1
  409. data/lib/facet/string/tab.rb +2 -1
  410. data/lib/facet/string/tabto.rb +2 -1
  411. data/lib/facet/string/to_a.rb +35 -1
  412. data/lib/facet/string/to_arr.rb +55 -1
  413. data/lib/facet/string/to_b.rb +64 -1
  414. data/lib/facet/string/to_const.rb +39 -1
  415. data/lib/facet/string/to_date.rb +35 -1
  416. data/lib/facet/string/to_proc.rb +54 -1
  417. data/lib/facet/string/to_re.rb +46 -1
  418. data/lib/facet/string/to_rx.rb +2 -0
  419. data/lib/facet/string/to_time.rb +34 -1
  420. data/lib/facet/string/unbracket.rb +46 -1
  421. data/lib/facet/string/underscore.rb +18 -1
  422. data/lib/facet/string/unix_crypt.rb +41 -1
  423. data/lib/facet/string/unpack.rb +45 -1
  424. data/lib/facet/string/unshift.rb +42 -1
  425. data/lib/facet/string/upcase.rb +45 -1
  426. data/lib/facet/string/uppercase.rb +2 -1
  427. data/lib/facet/string/whitespace.rb +27 -1
  428. data/lib/facet/string/word_filter.rb +61 -1
  429. data/lib/facet/string/word_wrap.rb +90 -1
  430. data/lib/facet/string/words.rb +45 -1
  431. data/lib/facet/symbol.rb +13 -1
  432. data/lib/facet/symbol/camelcase.rb +42 -1
  433. data/lib/facet/symbol/camelize.rb +33 -1
  434. data/lib/facet/symbol/capitalize.rb +31 -1
  435. data/lib/facet/symbol/capitalized.rb +33 -1
  436. data/lib/facet/symbol/downcase.rb +36 -1
  437. data/lib/facet/symbol/not.rb +40 -1
  438. data/lib/facet/symbol/pad.rb +43 -1
  439. data/lib/facet/symbol/succ.rb +42 -1
  440. data/lib/facet/symbol/to_const.rb +40 -1
  441. data/lib/facet/symbol/to_proc.rb +45 -1
  442. data/lib/facet/symbol/to_str.rb +39 -1
  443. data/lib/facet/symbol/underscore.rb +32 -1
  444. data/lib/facet/symbol/upcase.rb +37 -1
  445. data/lib/facet/time.rb +7 -1
  446. data/lib/facet/time/change.rb +51 -1
  447. data/lib/facet/time/elapse.rb +41 -1
  448. data/lib/facet/time/self/days_extrema.rb +22 -1
  449. data/lib/facet/time/stamp.rb +47 -1
  450. data/lib/facet/time/to_date.rb +37 -1
  451. data/lib/facet/time/to_s.rb +33 -1
  452. data/lib/facet/time/to_time.rb +36 -1
  453. data/lib/facet/unboundmethod.rb +1 -1
  454. data/lib/facet/unboundmethod/name.rb +8 -1
  455. data/lib/facets.rb +135 -154
  456. data/lib/facets/english/bytes.rb +212 -0
  457. data/lib/facets/english/multipliers.rb +192 -0
  458. data/lib/facets/english/ormsupport.rb +233 -0
  459. data/lib/facets/english/time.rb +327 -0
  460. data/lib/facets/group/inflect.rb +71 -0
  461. data/lib/facets/group/nilasemptiness.rb +34 -0
  462. data/lib/facets/group/random.rb +21 -0
  463. data/lib/facets/group/stringasarray.rb +16 -0
  464. data/lib/facets/method/README +1 -0
  465. data/lib/facets/support/functor.rb +49 -0
  466. data/test/lib/facet/array/test_at_rand.rb +34 -0
  467. data/test/lib/facet/array/test_delete_unless.rb +28 -0
  468. data/test/lib/facet/array/test_delete_values.rb +28 -0
  469. data/test/lib/facet/array/test_delete_values_at.rb +31 -0
  470. data/test/lib/facet/array/test_first.rb +46 -0
  471. data/test/lib/facet/array/test_head.rb +42 -0
  472. data/test/lib/facet/array/test_last_index.rb +26 -0
  473. data/test/lib/facet/array/test_merge.rb +35 -0
  474. data/test/lib/facet/array/test_mid.rb +33 -0
  475. data/test/lib/facet/array/test_middle.rb +29 -0
  476. data/test/lib/facet/array/test_op_fetch.rb +27 -0
  477. data/test/lib/facet/array/test_op_store.rb +30 -0
  478. data/test/lib/facet/array/test_pick.rb +40 -0
  479. data/test/lib/facet/array/test_pos.rb +28 -0
  480. data/test/lib/facet/array/test_pull.rb +28 -0
  481. data/test/lib/facet/array/test_rand_index.rb +29 -0
  482. data/test/lib/facet/array/test_rand_subset.rb +29 -0
  483. data/test/lib/facet/array/test_range.rb +32 -0
  484. data/test/lib/facet/array/test_rotate.rb +36 -0
  485. data/test/lib/facet/array/test_select.rb +28 -0
  486. data/test/lib/facet/array/test_shuffle.rb +35 -0
  487. data/test/lib/facet/array/test_slap.rb +28 -0
  488. data/test/lib/facet/array/test_thru.rb +27 -0
  489. data/test/lib/facet/array/test_to_b.rb +27 -0
  490. data/test/lib/facet/array/test_to_h.rb +33 -0
  491. data/test/lib/facet/array/test_to_hash.rb +27 -0
  492. data/test/lib/facet/binding/self/test_of_caller.rb +35 -0
  493. data/test/lib/facet/binding/test___LINE__.rb +43 -0
  494. data/test/lib/facet/binding/test_call_stack.rb +34 -0
  495. data/test/lib/facet/binding/test_called.rb +30 -0
  496. data/test/lib/facet/binding/test_caller.rb +35 -0
  497. data/test/lib/facet/binding/test_defined.rb +34 -0
  498. data/test/lib/facet/binding/test_eval.rb +34 -0
  499. data/test/lib/facet/binding/test_local_variables.rb +34 -0
  500. data/test/lib/facet/binding/test_method_name.rb +34 -0
  501. data/test/lib/facet/binding/test_op_fetch.rb +34 -0
  502. data/test/lib/facet/binding/test_op_store.rb +35 -0
  503. data/test/lib/facet/binding/test_self.rb +34 -0
  504. data/test/lib/facet/class/test_descendents.rb +30 -0
  505. data/test/lib/facet/class/test_remove_descendents.rb +32 -0
  506. data/test/lib/facet/comparable/test_at_least.rb +34 -0
  507. data/test/lib/facet/comparable/test_clip.rb +44 -0
  508. data/test/lib/facet/comparable/test_cmp.rb +28 -0
  509. data/test/lib/facet/continuation/self/test_create.rb +26 -0
  510. data/test/lib/facet/date/test_days_in_month.rb +30 -0
  511. data/test/lib/facet/date/test_days_of_month.rb +30 -0
  512. data/test/lib/facet/date/test_stamp.rb +38 -0
  513. data/test/lib/facet/date/test_to_date.rb +30 -0
  514. data/test/lib/facet/date/test_to_s.rb +30 -0
  515. data/test/lib/facet/date/test_to_time.rb +30 -0
  516. data/test/lib/facet/dir/self/test_ancestor.rb +26 -0
  517. data/test/lib/facet/dir/self/test_ascend.rb +41 -0
  518. data/test/lib/facet/dir/self/test_ls_r.rb +52 -0
  519. data/test/lib/facet/enumerable/self/test_combinations.rb +43 -0
  520. data/test/lib/facet/enumerable/self/test_cross.rb +31 -0
  521. data/test/lib/facet/enumerable/test_collect_with_index.rb +27 -0
  522. data/test/lib/facet/enumerable/test_commonality.rb +31 -0
  523. data/test/lib/facet/enumerable/test_compact_collect.rb +27 -0
  524. data/test/lib/facet/enumerable/test_cross.rb +30 -0
  525. data/test/lib/facet/enumerable/test_each_combination.rb +29 -0
  526. data/test/lib/facet/enumerable/test_each_pair.rb +29 -0
  527. data/test/lib/facet/enumerable/test_each_slice.rb +74 -0
  528. data/test/lib/facet/enumerable/test_each_unique_pair.rb +29 -0
  529. data/test/lib/facet/enumerable/test_entropy.rb +26 -0
  530. data/test/lib/facet/enumerable/test_every.rb +35 -0
  531. data/test/lib/facet/enumerable/test_ew.rb +31 -0
  532. data/test/lib/facet/enumerable/test_filter_collect.rb +31 -0
  533. data/test/lib/facet/enumerable/test_find_collisions.rb +30 -0
  534. data/test/lib/facet/enumerable/test_frequency.rb +27 -0
  535. data/test/lib/facet/enumerable/test_graph.rb +30 -0
  536. data/test/lib/facet/enumerable/test_ideal_entropy.rb +27 -0
  537. data/test/lib/facet/enumerable/test_none.rb +33 -0
  538. data/test/lib/facet/enumerable/test_occur.rb +30 -0
  539. data/test/lib/facet/enumerable/test_one.rb +35 -0
  540. data/test/lib/facet/enumerable/test_op_pow.rb +27 -0
  541. data/test/lib/facet/enumerable/test_partition_by.rb +31 -0
  542. data/test/lib/facet/enumerable/test_permute.rb +29 -0
  543. data/test/lib/facet/enumerable/test_probability.rb +27 -0
  544. data/test/lib/facet/enumerable/test_to_h.rb +27 -0
  545. data/test/lib/facet/enumerable/test_uniq_by.rb +28 -0
  546. data/test/lib/facet/file/self/test_create.rb +39 -0
  547. data/test/lib/facet/file/self/test_open_as_string.rb +40 -0
  548. data/test/lib/facet/file/self/test_read_list.rb +37 -0
  549. data/test/lib/facet/file/self/test_sanitize.rb +46 -0
  550. data/test/lib/facet/file/self/test_split_all.rb +27 -0
  551. data/test/lib/facet/fileutils/test_slice.rb +96 -0
  552. data/test/lib/facet/fileutils/test_wc.rb +68 -0
  553. data/test/lib/facet/fileutils/test_which.rb +61 -0
  554. data/test/lib/facet/float/test_approx.rb +28 -0
  555. data/test/lib/facet/float/test_round_at.rb +46 -0
  556. data/test/lib/facet/float/test_round_to.rb +46 -0
  557. data/test/lib/facet/hash/self/test_zipnew.rb +28 -0
  558. data/test/lib/facet/hash/test_alias.rb +31 -0
  559. data/test/lib/facet/hash/test_assert_has_keys.rb +27 -0
  560. data/test/lib/facet/hash/test_assert_has_only_keys.rb +27 -0
  561. data/test/lib/facet/hash/test_at.rb +28 -0
  562. data/test/lib/facet/hash/test_collate.rb +35 -0
  563. data/test/lib/facet/hash/test_each.rb +36 -0
  564. data/test/lib/facet/hash/test_each_with_index.rb +29 -0
  565. data/test/lib/facet/hash/test_each_with_key.rb +29 -0
  566. data/test/lib/facet/hash/test_graph.rb +28 -0
  567. data/test/lib/facet/hash/test_has_keys.rb +27 -0
  568. data/test/lib/facet/hash/test_has_only_keys.rb +27 -0
  569. data/test/lib/facet/hash/test_inverse.rb +28 -0
  570. data/test/lib/facet/hash/test_keys_to_s.rb +34 -0
  571. data/test/lib/facet/hash/test_keys_to_sym.rb +34 -0
  572. data/test/lib/facet/hash/test_op_fetch.rb +111 -0
  573. data/test/lib/facet/hash/test_op_lshift.rb +29 -0
  574. data/test/lib/facet/hash/test_rand_key.rb +27 -0
  575. data/test/lib/facet/hash/test_rand_pair.rb +27 -0
  576. data/test/lib/facet/hash/test_rand_value.rb +27 -0
  577. data/test/lib/facet/hash/test_replace_each.rb +29 -0
  578. data/test/lib/facet/hash/test_shuffle.rb +32 -0
  579. data/test/lib/facet/hash/test_slice.rb +27 -0
  580. data/test/lib/facet/hash/test_swap.rb +27 -0
  581. data/test/lib/facet/hash/test_swapkey.rb +29 -0
  582. data/test/lib/facet/hash/test_to_h.rb +27 -0
  583. data/test/lib/facet/hash/test_to_ostruct.rb +30 -0
  584. data/test/lib/facet/hash/test_to_ostruct_recurse.rb +30 -0
  585. data/test/lib/facet/hash/test_traverse.rb +37 -0
  586. data/test/lib/facet/hash/test_update_each.rb +29 -0
  587. data/test/lib/facet/hash/test_update_keys.rb +28 -0
  588. data/test/lib/facet/hash/test_update_values.rb +28 -0
  589. data/test/lib/facet/hash/test_weave.rb +29 -0
  590. data/test/lib/facet/integer/test_factorial.rb +30 -0
  591. data/test/lib/facet/integer/test_multiple.rb +43 -0
  592. data/test/lib/facet/integer/test_ordinal.rb +29 -0
  593. data/test/lib/facet/integer/test_times_collect.rb +28 -0
  594. data/test/lib/facet/kernel/test___class__.rb +26 -0
  595. data/test/lib/facet/kernel/test_as.rb +42 -0
  596. data/test/lib/facet/kernel/test_assign_from.rb +31 -0
  597. data/test/lib/facet/kernel/test_assign_with.rb +31 -0
  598. data/test/lib/facet/kernel/test_bool.rb +41 -0
  599. data/test/lib/facet/kernel/test_bug.rb +26 -0
  600. data/test/lib/facet/kernel/test_call_stack.rb +26 -0
  601. data/test/lib/facet/kernel/test_called.rb +26 -0
  602. data/test/lib/facet/kernel/test_constant.rb +33 -0
  603. data/test/lib/facet/kernel/test_copy.rb +40 -0
  604. data/test/lib/facet/kernel/test_deep_copy.rb +40 -0
  605. data/test/lib/facet/kernel/test_demo.rb +28 -0
  606. data/test/lib/facet/kernel/test_fn.rb +26 -0
  607. data/test/lib/facet/kernel/test_generate_method_name.rb +26 -0
  608. data/test/lib/facet/kernel/test_get_by_id.rb +28 -0
  609. data/test/lib/facet/kernel/test_here.rb +26 -0
  610. data/test/lib/facet/kernel/test_in.rb +27 -0
  611. data/test/lib/facet/kernel/test_maybe.rb +26 -0
  612. data/test/lib/facet/kernel/test_metaclass.rb +34 -0
  613. data/test/lib/facet/kernel/test_method.rb +32 -0
  614. data/test/lib/facet/kernel/test_method_name.rb +31 -0
  615. data/test/lib/facet/kernel/test_methods.rb +50 -0
  616. data/test/lib/facet/kernel/test_new.rb +30 -0
  617. data/test/lib/facet/kernel/test_object_class.rb +26 -0
  618. data/test/lib/facet/kernel/test_object_hexid.rb +27 -0
  619. data/test/lib/facet/kernel/test_require_all.rb +26 -0
  620. data/test/lib/facet/kernel/test_require_esc.rb +27 -0
  621. data/test/lib/facet/kernel/test_require_facet.rb +27 -0
  622. data/test/lib/facet/kernel/test_resc.rb +27 -0
  623. data/test/lib/facet/kernel/test_returning.rb +30 -0
  624. data/test/lib/facet/kernel/test_send_as.rb +26 -0
  625. data/test/lib/facet/kernel/test_set_from.rb +33 -0
  626. data/test/lib/facet/kernel/test_set_with.rb +33 -0
  627. data/test/lib/facet/kernel/test_silently.rb +28 -0
  628. data/test/lib/facet/kernel/test_singleton.rb +40 -0
  629. data/test/lib/facet/kernel/test_superior.rb +30 -0
  630. data/test/lib/facet/kernel/test_supermethod.rb +33 -0
  631. data/test/lib/facet/kernel/test_this.rb +26 -0
  632. data/test/lib/facet/kernel/test_to_b.rb +28 -0
  633. data/test/lib/facet/kernel/test_to_bool.rb +28 -0
  634. data/test/lib/facet/kernel/test_uri.rb +30 -0
  635. data/test/lib/facet/kernel/test_val.rb +43 -0
  636. data/test/lib/facet/kernel/test_with_accessor.rb +51 -0
  637. data/test/lib/facet/matchdata/test_match.rb +29 -0
  638. data/test/lib/facet/matchdata/test_matchtree.rb +32 -0
  639. data/test/lib/facet/module/test_abstract.rb +36 -0
  640. data/test/lib/facet/module/test_alias_module_function.rb +34 -0
  641. data/test/lib/facet/module/test_ancestor.rb +26 -0
  642. data/test/lib/facet/module/test_basename.rb +26 -0
  643. data/test/lib/facet/module/test_by_name.rb +29 -0
  644. data/test/lib/facet/module/test_cattr_accessor.rb +55 -0
  645. data/test/lib/facet/module/test_clone_using.rb +55 -0
  646. data/test/lib/facet/module/test_dirname.rb +26 -0
  647. data/test/lib/facet/module/test_equate_on.rb +37 -0
  648. data/test/lib/facet/module/test_generate_instance_method_name.rb +33 -0
  649. data/test/lib/facet/module/test_include_as.rb +35 -0
  650. data/test/lib/facet/module/test_initializer.rb +32 -0
  651. data/test/lib/facet/module/test_instance_methods.rb +59 -0
  652. data/test/lib/facet/module/test_integrate.rb +35 -0
  653. data/test/lib/facet/module/test_memoize.rb +50 -0
  654. data/test/lib/facet/module/test_modspace.rb +27 -0
  655. data/test/lib/facet/module/test_namespace.rb +33 -0
  656. data/test/lib/facet/module/test_nesting.rb +36 -0
  657. data/test/lib/facet/module/test_redef.rb +30 -0
  658. data/test/lib/facet/module/test_redefine_method.rb +30 -0
  659. data/test/lib/facet/module/test_redirect.rb +30 -0
  660. data/test/lib/facet/module/test_redirect_method.rb +30 -0
  661. data/test/lib/facet/module/test_remove.rb +30 -0
  662. data/test/lib/facet/module/test_rename.rb +31 -0
  663. data/test/lib/facet/module/test_rename_method.rb +31 -0
  664. data/test/lib/facet/module/test_revisal.rb +35 -0
  665. data/test/lib/facet/module/test_shadow_method.rb +30 -0
  666. data/test/lib/facet/module/test_sort_on.rb +42 -0
  667. data/test/lib/facet/module/test_undef.rb +30 -0
  668. data/test/lib/facet/module/test_wrap.rb +30 -0
  669. data/test/lib/facet/module/test_wrap_method.rb +30 -0
  670. data/test/lib/facet/nilclass/test_empty.rb +26 -0
  671. data/test/lib/facet/nilclass/test_include.rb +26 -0
  672. data/test/lib/facet/nilclass/test_op_fetch.rb +28 -0
  673. data/test/lib/facet/nilclass/test_size.rb +30 -0
  674. data/test/lib/facet/nilclass/test_to_f.rb +26 -0
  675. data/test/lib/facet/nilclass/test_to_h.rb +26 -0
  676. data/test/lib/facet/numeric/test_ceil_multiple.rb +31 -0
  677. data/test/lib/facet/numeric/test_succ.rb +40 -0
  678. data/test/lib/facet/numeric/test_to_b.rb +27 -0
  679. data/test/lib/facet/ostruct/test___merge__.rb +38 -0
  680. data/test/lib/facet/ostruct/test___update__.rb +29 -0
  681. data/test/lib/facet/ostruct/test_op_fetch.rb +27 -0
  682. data/test/lib/facet/ostruct/test_op_store.rb +28 -0
  683. data/test/lib/facet/proc/test_compose.rb +36 -0
  684. data/test/lib/facet/proc/test_to_method.rb +31 -0
  685. data/test/lib/facet/range/test_to_r.rb +27 -0
  686. data/test/lib/facet/range/test_to_range.rb +27 -0
  687. data/test/lib/facet/range/test_umbrella.rb +34 -0
  688. data/test/lib/facet/range/test_within.rb +29 -0
  689. data/test/lib/facet/regexp/test_arity.rb +33 -0
  690. data/test/lib/facet/regexp/test_to_re.rb +27 -0
  691. data/test/lib/facet/regexp/test_to_regexp.rb +27 -0
  692. data/test/lib/facet/string/self/test_interpolate.rb +27 -0
  693. data/test/lib/facet/string/self/test_patterns.rb +28 -0
  694. data/test/lib/facet/string/self/test_rand_letter.rb +26 -0
  695. data/test/lib/facet/string/test_align_center.rb +34 -0
  696. data/test/lib/facet/string/test_at_rand.rb +35 -0
  697. data/test/lib/facet/string/test_basename.rb +41 -0
  698. data/test/lib/facet/string/test_blank.rb +27 -0
  699. data/test/lib/facet/string/test_bracket.rb +49 -0
  700. data/test/lib/facet/string/test_camelcase.rb +39 -0
  701. data/test/lib/facet/string/test_camelize.rb +26 -0
  702. data/test/lib/facet/string/test_capitalized.rb +26 -0
  703. data/test/lib/facet/string/test_chars.rb +27 -0
  704. data/test/lib/facet/string/test_cmp.rb +30 -0
  705. data/test/lib/facet/string/test_demodulize.rb +38 -0
  706. data/test/lib/facet/string/test_downcase.rb +26 -0
  707. data/test/lib/facet/string/test_dresner.rb +32 -0
  708. data/test/lib/facet/string/test_each_char.rb +29 -0
  709. data/test/lib/facet/string/test_each_word.rb +29 -0
  710. data/test/lib/facet/string/test_first.rb +43 -0
  711. data/test/lib/facet/string/test_fold.rb +34 -0
  712. data/test/lib/facet/string/test_frequency.rb +28 -0
  713. data/test/lib/facet/string/test_humanize.rb +26 -0
  714. data/test/lib/facet/string/test_indent.rb +40 -0
  715. data/test/lib/facet/string/test_index_all.rb +26 -0
  716. data/test/lib/facet/string/test_last.rb +46 -0
  717. data/test/lib/facet/string/test_line_wrap.rb +27 -0
  718. data/test/lib/facet/string/test_lines.rb +26 -0
  719. data/test/lib/facet/string/test_lowercase.rb +26 -0
  720. data/test/lib/facet/string/test_margin.rb +117 -0
  721. data/test/lib/facet/string/test_mscan.rb +30 -0
  722. data/test/lib/facet/string/test_natcmp.rb +30 -0
  723. data/test/lib/facet/string/test_nchar.rb +29 -0
  724. data/test/lib/facet/string/test_pop.rb +47 -0
  725. data/test/lib/facet/string/test_probability.rb +28 -0
  726. data/test/lib/facet/string/test_push.rb +40 -0
  727. data/test/lib/facet/string/test_quote.rb +49 -0
  728. data/test/lib/facet/string/test_rand_byte.rb +35 -0
  729. data/test/lib/facet/string/test_rand_index.rb +26 -0
  730. data/test/lib/facet/string/test_range.rb +27 -0
  731. data/test/lib/facet/string/test_range_all.rb +27 -0
  732. data/test/lib/facet/string/test_range_of_line.rb +28 -0
  733. data/test/lib/facet/string/test_regesc.rb +28 -0
  734. data/test/lib/facet/string/test_shatter.rb +29 -0
  735. data/test/lib/facet/string/test_shift.rb +40 -0
  736. data/test/lib/facet/string/test_shuffle.rb +27 -0
  737. data/test/lib/facet/string/test_similarity.rb +26 -0
  738. data/test/lib/facet/string/test_singular.rb +32 -0
  739. data/test/lib/facet/string/test_slap.rb +40 -0
  740. data/test/lib/facet/string/test_soundex.rb +41 -0
  741. data/test/lib/facet/string/test_succ.rb +29 -0
  742. data/test/lib/facet/string/test_to_a.rb +27 -0
  743. data/test/lib/facet/string/test_to_arr.rb +26 -0
  744. data/test/lib/facet/string/test_to_b.rb +41 -0
  745. data/test/lib/facet/string/test_to_const.rb +28 -0
  746. data/test/lib/facet/string/test_to_date.rb +30 -0
  747. data/test/lib/facet/string/test_to_proc.rb +33 -0
  748. data/test/lib/facet/string/test_to_re.rb +28 -0
  749. data/test/lib/facet/string/test_to_time.rb +30 -0
  750. data/test/lib/facet/string/test_unix_crypt.rb +30 -0
  751. data/test/lib/facet/string/test_unpack.rb +34 -0
  752. data/test/lib/facet/string/test_unshift.rb +39 -0
  753. data/test/lib/facet/string/test_upcase.rb +30 -0
  754. data/test/lib/facet/string/test_whitespace.rb +27 -0
  755. data/test/lib/facet/string/test_word_filter.rb +34 -0
  756. data/test/lib/facet/string/test_word_wrap.rb +51 -0
  757. data/test/lib/facet/string/test_words.rb +37 -0
  758. data/test/lib/facet/symbol/test_camelcase.rb +26 -0
  759. data/test/lib/facet/symbol/test_camelize.rb +27 -0
  760. data/test/lib/facet/symbol/test_capitalize.rb +26 -0
  761. data/test/lib/facet/symbol/test_capitalized.rb +27 -0
  762. data/test/lib/facet/symbol/test_downcase.rb +27 -0
  763. data/test/lib/facet/symbol/test_not.rb +29 -0
  764. data/test/lib/facet/symbol/test_pad.rb +27 -0
  765. data/test/lib/facet/symbol/test_succ.rb +28 -0
  766. data/test/lib/facet/symbol/test_to_const.rb +28 -0
  767. data/test/lib/facet/symbol/test_to_proc.rb +27 -0
  768. data/test/lib/facet/symbol/test_to_str.rb +28 -0
  769. data/test/lib/facet/symbol/test_underscore.rb +26 -0
  770. data/test/lib/facet/symbol/test_upcase.rb +27 -0
  771. data/test/lib/facet/time/test_change.rb +33 -0
  772. data/test/lib/facet/time/test_elapse.rb +27 -0
  773. data/test/lib/facet/time/test_stamp.rb +31 -0
  774. data/test/lib/facet/time/test_to_date.rb +31 -0
  775. data/test/lib/facet/time/test_to_s.rb +31 -0
  776. data/test/lib/facet/time/test_to_time.rb +31 -0
  777. data/test/lib/facets/english/test_bytes.rb +84 -0
  778. data/test/lib/facets/english/test_multipliers.rb +114 -0
  779. data/test/lib/facets/english/test_time.rb +73 -0
  780. metadata +895 -1625
  781. data/ANN +0 -59
  782. data/LICENSE/COPYING-GPL +0 -341
  783. data/LICENSE/LICENSE-ART +0 -50
  784. data/LICENSE/LICENSE-LGPL +0 -175
  785. data/LICENSE/LICENSE-MIT +0 -8
  786. data/LICENSE/LICENSE-RUBY +0 -60
  787. data/bench/b_calls.rb +0 -74
  788. data/bench/b_harray.rb +0 -49
  789. data/bench/b_pathname.rb +0 -24
  790. data/bench/b_range.rb +0 -64
  791. data/bench/return-bench.rb +0 -56
  792. data/bin/uri +0 -6
  793. data/conf/facets/extra +0 -7
  794. data/data/facets/units/binary/base.yaml +0 -12
  795. data/data/facets/units/binary/extra.yaml +0 -8
  796. data/data/facets/units/cex.yaml +0 -7
  797. data/data/facets/units/currency/base.yaml +0 -268
  798. data/data/facets/units/default.yaml +0 -22
  799. data/data/facets/units/dump_yaml.rb +0 -309
  800. data/data/facets/units/si/base.yaml +0 -36
  801. data/data/facets/units/si/derived.yaml +0 -133
  802. data/data/facets/units/si/extra.yaml +0 -107
  803. data/data/facets/units/standard.yaml +0 -5
  804. data/data/facets/units/uk.yaml +0 -16
  805. data/data/facets/units/uk/base.yaml +0 -107
  806. data/data/facets/units/us.yaml +0 -16
  807. data/data/facets/units/us/base.yaml +0 -112
  808. data/data/facets/units/xmethods/cached.yaml +0 -83
  809. data/data/facets/units/xmethods/mapping.yaml +0 -85
  810. data/demo/ann-demo.rb +0 -22
  811. data/lib/facet/all.rb +0 -1
  812. data/lib/facet/annotation.rb +0 -1
  813. data/lib/facet/ansicolor.rb +0 -1
  814. data/lib/facet/association.rb +0 -1
  815. data/lib/facet/base.rb +0 -1
  816. data/lib/facet/basicobject.rb +0 -1
  817. data/lib/facet/bbcode.rb +0 -1
  818. data/lib/facet/binary_multiplier.rb +0 -1
  819. data/lib/facet/binaryreader.rb +0 -1
  820. data/lib/facet/blankslate.rb +0 -1
  821. data/lib/facet/byteorder.rb +0 -1
  822. data/lib/facet/class_inherit.rb +0 -1
  823. data/lib/facet/classmethods.rb +0 -1
  824. data/lib/facet/cloneable.rb +0 -1
  825. data/lib/facet/constants.rb +0 -1
  826. data/lib/facet/coroutine.rb +0 -1
  827. data/lib/facet/crosscase.rb +0 -1
  828. data/lib/facet/crypt.rb +0 -1
  829. data/lib/facet/dictionary.rb +0 -1
  830. data/lib/facet/downloader.rb +0 -1
  831. data/lib/facet/dynamod.rb +0 -1
  832. data/lib/facet/enumerable_args.rb +0 -1
  833. data/lib/facet/enumtype.rb +0 -1
  834. data/lib/facet/expirable.rb +0 -1
  835. data/lib/facet/filelist.rb +0 -1
  836. data/lib/facet/fixnum_const.rb +0 -1
  837. data/lib/facet/floatstring.rb +0 -1
  838. data/lib/facet/functor.rb +0 -1
  839. data/lib/facet/harray.rb +0 -1
  840. data/lib/facet/heap.rb +0 -1
  841. data/lib/facet/infinity.rb +0 -1
  842. data/lib/facet/inflect.rb +0 -1
  843. data/lib/facet/inheritor.rb +0 -1
  844. data/lib/facet/interval.rb +0 -1
  845. data/lib/facet/ioreactor.rb +0 -1
  846. data/lib/facet/ioredirect.rb +0 -1
  847. data/lib/facet/lisp.rb +0 -1
  848. data/lib/facet/lru_cache.rb +0 -1
  849. data/lib/facet/methodprobe.rb +0 -1
  850. data/lib/facet/mock.rb +0 -1
  851. data/lib/facet/multiplier.rb +0 -1
  852. data/lib/facet/multiton.rb +0 -1
  853. data/lib/facet/nack.rb +0 -1
  854. data/lib/facet/nil_as_emptiness.rb +0 -1
  855. data/lib/facet/nilcomparable.rb +0 -1
  856. data/lib/facet/notcopyable.rb +0 -1
  857. data/lib/facet/null.rb +0 -1
  858. data/lib/facet/ohash.rb +0 -1
  859. data/lib/facet/one.rb +0 -1
  860. data/lib/facet/openobject.rb +0 -1
  861. data/lib/facet/orm_support.rb +0 -1
  862. data/lib/facet/ostructable.rb +0 -1
  863. data/lib/facet/package.rb +0 -1
  864. data/lib/facet/pool.rb +0 -1
  865. data/lib/facet/preinitialize.rb +0 -1
  866. data/lib/facet/progressbar.rb +0 -1
  867. data/lib/facet/promoteself.rb +0 -1
  868. data/lib/facet/proxy.rb +0 -1
  869. data/lib/facet/quicktest.rb +0 -1
  870. data/lib/facet/random.rb +0 -1
  871. data/lib/facet/reference.rb +0 -1
  872. data/lib/facet/semaphore.rb +0 -1
  873. data/lib/facet/shellcommand.rb +0 -1
  874. data/lib/facet/snapshot.rb +0 -1
  875. data/lib/facet/stateparser.rb +0 -1
  876. data/lib/facet/statichash.rb +0 -1
  877. data/lib/facet/string_as_array.rb +0 -1
  878. data/lib/facet/superstruct.rb +0 -1
  879. data/lib/facet/syncarray.rb +0 -1
  880. data/lib/facet/synchash.rb +0 -1
  881. data/lib/facet/tagiter.rb +0 -1
  882. data/lib/facet/template.rb +0 -1
  883. data/lib/facet/test.rb +0 -1
  884. data/lib/facet/time_in_english.rb +0 -1
  885. data/lib/facet/timer.rb +0 -1
  886. data/lib/facet/tracepoint.rb +0 -1
  887. data/lib/facet/tuple.rb +0 -1
  888. data/lib/facet/uninheritable.rb +0 -1
  889. data/lib/facet/units.rb +0 -1
  890. data/lib/facet/version.rb +0 -1
  891. data/lib/facet/yamlstruct.rb +0 -1
  892. data/lib/mega/annotation.rb +0 -568
  893. data/lib/mega/ansicolor.rb +0 -193
  894. data/lib/mega/association.rb +0 -174
  895. data/lib/mega/basicobject.rb +0 -108
  896. data/lib/mega/bbcode.rb +0 -410
  897. data/lib/mega/binary_multiplier.rb +0 -250
  898. data/lib/mega/binaryreader.rb +0 -210
  899. data/lib/mega/blankslate.rb +0 -3
  900. data/lib/mega/byteorder.rb +0 -119
  901. data/lib/mega/class_inherit.rb +0 -208
  902. data/lib/mega/classmethods.rb +0 -111
  903. data/lib/mega/cloneable.rb +0 -52
  904. data/lib/mega/constants.rb +0 -308
  905. data/lib/mega/coroutine.rb +0 -173
  906. data/lib/mega/crosscase.rb +0 -347
  907. data/lib/mega/crypt.rb +0 -167
  908. data/lib/mega/dictionary.rb +0 -340
  909. data/lib/mega/downloader.rb +0 -240
  910. data/lib/mega/dynamod.rb +0 -249
  911. data/lib/mega/enumerable_args.rb +0 -218
  912. data/lib/mega/enumtype.rb +0 -105
  913. data/lib/mega/expirable.rb +0 -88
  914. data/lib/mega/filelist.rb +0 -478
  915. data/lib/mega/fixnum_const.rb +0 -62
  916. data/lib/mega/floatstring.rb +0 -179
  917. data/lib/mega/functor.rb +0 -98
  918. data/lib/mega/harray.rb +0 -817
  919. data/lib/mega/heap.rb +0 -226
  920. data/lib/mega/infinity.rb +0 -123
  921. data/lib/mega/inheritor.rb +0 -236
  922. data/lib/mega/interval.rb +0 -426
  923. data/lib/mega/ioreactor.rb +0 -671
  924. data/lib/mega/ioredirect.rb +0 -130
  925. data/lib/mega/lisp.rb +0 -387
  926. data/lib/mega/lru_cache.rb +0 -184
  927. data/lib/mega/mock.rb +0 -224
  928. data/lib/mega/multiplier.rb +0 -180
  929. data/lib/mega/multiton.rb +0 -360
  930. data/lib/mega/nack.rb +0 -162
  931. data/lib/mega/nilcomparable.rb +0 -128
  932. data/lib/mega/notcopyable.rb +0 -146
  933. data/lib/mega/null.rb +0 -40
  934. data/lib/mega/ohash.rb +0 -3
  935. data/lib/mega/one.rb +0 -72
  936. data/lib/mega/openobject.rb +0 -220
  937. data/lib/mega/orm_support.rb +0 -233
  938. data/lib/mega/ostructable.rb +0 -212
  939. data/lib/mega/package.rb +0 -58
  940. data/lib/mega/pool.rb +0 -98
  941. data/lib/mega/preinitialize.rb +0 -152
  942. data/lib/mega/progressbar.rb +0 -214
  943. data/lib/mega/promoteself.rb +0 -104
  944. data/lib/mega/proxy.rb +0 -13
  945. data/lib/mega/reference.rb +0 -83
  946. data/lib/mega/semaphore.rb +0 -106
  947. data/lib/mega/shellcommand.rb +0 -55
  948. data/lib/mega/snapshot.rb +0 -190
  949. data/lib/mega/stateparser.rb +0 -576
  950. data/lib/mega/statichash.rb +0 -86
  951. data/lib/mega/superstruct.rb +0 -744
  952. data/lib/mega/syncarray.rb +0 -118
  953. data/lib/mega/synchash.rb +0 -173
  954. data/lib/mega/tagiter.rb +0 -389
  955. data/lib/mega/template.rb +0 -211
  956. data/lib/mega/time_in_english.rb +0 -347
  957. data/lib/mega/timer.rb +0 -293
  958. data/lib/mega/tracepoint.rb +0 -184
  959. data/lib/mega/tuple.rb +0 -97
  960. data/lib/mega/uninheritable.rb +0 -92
  961. data/lib/mega/units.rb +0 -926
  962. data/lib/mega/version.rb +0 -245
  963. data/lib/mega/yamlstruct.rb +0 -16
  964. data/lib/nano/all.rb +0 -18
  965. data/lib/nano/array.rb +0 -33
  966. data/lib/nano/array/at_rand.rb +0 -52
  967. data/lib/nano/array/body.rb +0 -35
  968. data/lib/nano/array/delete_unless.rb +0 -35
  969. data/lib/nano/array/delete_values.rb +0 -38
  970. data/lib/nano/array/delete_values_at.rb +0 -57
  971. data/lib/nano/array/each_with_key.rb +0 -9
  972. data/lib/nano/array/first.rb +0 -53
  973. data/lib/nano/array/foot.rb +0 -36
  974. data/lib/nano/array/head.rb +0 -36
  975. data/lib/nano/array/last.rb +0 -53
  976. data/lib/nano/array/last_index.rb +0 -35
  977. data/lib/nano/array/merge.rb +0 -40
  978. data/lib/nano/array/mid.rb +0 -50
  979. data/lib/nano/array/middle.rb +0 -45
  980. data/lib/nano/array/op_fetch.rb +0 -40
  981. data/lib/nano/array/op_store.rb +0 -47
  982. data/lib/nano/array/pick.rb +0 -68
  983. data/lib/nano/array/pos.rb +0 -39
  984. data/lib/nano/array/pull.rb +0 -37
  985. data/lib/nano/array/rand_index.rb +0 -30
  986. data/lib/nano/array/rand_subset.rb +0 -56
  987. data/lib/nano/array/range.rb +0 -47
  988. data/lib/nano/array/rotate.rb +0 -67
  989. data/lib/nano/array/select.rb +0 -37
  990. data/lib/nano/array/shuffle.rb +0 -66
  991. data/lib/nano/array/slap.rb +0 -37
  992. data/lib/nano/array/store.rb +0 -7
  993. data/lib/nano/array/tail.rb +0 -34
  994. data/lib/nano/array/thru.rb +0 -38
  995. data/lib/nano/array/to_b.rb +0 -31
  996. data/lib/nano/array/to_h.rb +0 -57
  997. data/lib/nano/array/to_hash.rb +0 -46
  998. data/lib/nano/array/unzip.rb +0 -20
  999. data/lib/nano/base.rb +0 -73
  1000. data/lib/nano/binding.rb +0 -14
  1001. data/lib/nano/binding/__DIR__.rb +0 -2
  1002. data/lib/nano/binding/__FILE__.rb +0 -2
  1003. data/lib/nano/binding/__LINE__.rb +0 -58
  1004. data/lib/nano/binding/call_stack.rb +0 -41
  1005. data/lib/nano/binding/called.rb +0 -41
  1006. data/lib/nano/binding/caller.rb +0 -41
  1007. data/lib/nano/binding/defined.rb +0 -40
  1008. data/lib/nano/binding/eval.rb +0 -41
  1009. data/lib/nano/binding/local_variables.rb +0 -44
  1010. data/lib/nano/binding/method_name.rb +0 -47
  1011. data/lib/nano/binding/op_fetch.rb +0 -45
  1012. data/lib/nano/binding/op_store.rb +0 -46
  1013. data/lib/nano/binding/self.rb +0 -41
  1014. data/lib/nano/binding/self/of_caller.rb +0 -122
  1015. data/lib/nano/class.rb +0 -5
  1016. data/lib/nano/class/by_name.rb +0 -1
  1017. data/lib/nano/class/descendents.rb +0 -44
  1018. data/lib/nano/class/remove_descendents.rb +0 -46
  1019. data/lib/nano/class/remove_subclasses.rb +0 -2
  1020. data/lib/nano/class/subclasses.rb +0 -2
  1021. data/lib/nano/comparable.rb +0 -5
  1022. data/lib/nano/comparable/at_least.rb +0 -53
  1023. data/lib/nano/comparable/at_most.rb +0 -2
  1024. data/lib/nano/comparable/cap.rb +0 -2
  1025. data/lib/nano/comparable/clip.rb +0 -72
  1026. data/lib/nano/comparable/cmp.rb +0 -38
  1027. data/lib/nano/continuation.rb +0 -1
  1028. data/lib/nano/continuation/self/create.rb +0 -71
  1029. data/lib/nano/date.rb +0 -0
  1030. data/lib/nano/date/days_in_month.rb +0 -42
  1031. data/lib/nano/date/days_of_month.rb +0 -34
  1032. data/lib/nano/date/stamp.rb +0 -52
  1033. data/lib/nano/date/to_date.rb +0 -36
  1034. data/lib/nano/date/to_s.rb +0 -33
  1035. data/lib/nano/date/to_time.rb +0 -36
  1036. data/lib/nano/dir.rb +0 -4
  1037. data/lib/nano/dir/self/ancestor.rb +0 -33
  1038. data/lib/nano/dir/self/ascend.rb +0 -56
  1039. data/lib/nano/dir/self/ls_r.rb +0 -76
  1040. data/lib/nano/dir/self/recurse.rb +0 -2
  1041. data/lib/nano/enumerable.rb +0 -38
  1042. data/lib/nano/enumerable/collect_with_counter.rb +0 -2
  1043. data/lib/nano/enumerable/collect_with_index.rb +0 -51
  1044. data/lib/nano/enumerable/commonality.rb +0 -63
  1045. data/lib/nano/enumerable/compact_collect.rb +0 -50
  1046. data/lib/nano/enumerable/compact_map.rb +0 -2
  1047. data/lib/nano/enumerable/cross.rb +0 -44
  1048. data/lib/nano/enumerable/each_by.rb +0 -2
  1049. data/lib/nano/enumerable/each_combination.rb +0 -59
  1050. data/lib/nano/enumerable/each_pair.rb +0 -50
  1051. data/lib/nano/enumerable/each_permutation.rb +0 -42
  1052. data/lib/nano/enumerable/each_slice.rb +0 -131
  1053. data/lib/nano/enumerable/each_unique_pair.rb +0 -66
  1054. data/lib/nano/enumerable/each_with_counter.rb +0 -8
  1055. data/lib/nano/enumerable/elementwise.rb +0 -2
  1056. data/lib/nano/enumerable/entropy.rb +0 -52
  1057. data/lib/nano/enumerable/every.rb +0 -61
  1058. data/lib/nano/enumerable/ew.rb +0 -59
  1059. data/lib/nano/enumerable/filter_collect.rb +0 -58
  1060. data/lib/nano/enumerable/filter_map.rb +0 -2
  1061. data/lib/nano/enumerable/find_collisions.rb +0 -41
  1062. data/lib/nano/enumerable/frequency.rb +0 -39
  1063. data/lib/nano/enumerable/graph.rb +0 -59
  1064. data/lib/nano/enumerable/ideal_entropy.rb +0 -49
  1065. data/lib/nano/enumerable/map_with_counter.rb +0 -2
  1066. data/lib/nano/enumerable/map_with_index.rb +0 -2
  1067. data/lib/nano/enumerable/none.rb +0 -56
  1068. data/lib/nano/enumerable/nonuniq.rb +0 -39
  1069. data/lib/nano/enumerable/occur.rb +0 -62
  1070. data/lib/nano/enumerable/one.rb +0 -65
  1071. data/lib/nano/enumerable/op_pow.rb +0 -38
  1072. data/lib/nano/enumerable/partition_by.rb +0 -55
  1073. data/lib/nano/enumerable/probability.rb +0 -59
  1074. data/lib/nano/enumerable/project.rb +0 -11
  1075. data/lib/nano/enumerable/self/combinations.rb +0 -68
  1076. data/lib/nano/enumerable/self/cross.rb +0 -79
  1077. data/lib/nano/enumerable/to_h.rb +0 -50
  1078. data/lib/nano/enumerable/uniq_by.rb +0 -39
  1079. data/lib/nano/enumerable/where.rb +0 -12
  1080. data/lib/nano/file.rb +0 -5
  1081. data/lib/nano/file/self/create.rb +0 -52
  1082. data/lib/nano/file/self/open_as_string.rb +0 -81
  1083. data/lib/nano/file/self/read_list.rb +0 -47
  1084. data/lib/nano/file/self/sanitize.rb +0 -50
  1085. data/lib/nano/file/self/split_all.rb +0 -36
  1086. data/lib/nano/fileutils.rb +0 -0
  1087. data/lib/nano/fileutils/head.rb +0 -2
  1088. data/lib/nano/fileutils/safe_ln.rb +0 -38
  1089. data/lib/nano/fileutils/slice.rb +0 -148
  1090. data/lib/nano/fileutils/split_all.rb +0 -29
  1091. data/lib/nano/fileutils/tail.rb +0 -2
  1092. data/lib/nano/fileutils/wc.rb +0 -128
  1093. data/lib/nano/fileutils/whereis.rb +0 -76
  1094. data/lib/nano/fileutils/which.rb +0 -117
  1095. data/lib/nano/float.rb +0 -3
  1096. data/lib/nano/float/approx.rb +0 -42
  1097. data/lib/nano/float/round_at.rb +0 -72
  1098. data/lib/nano/float/round_to.rb +0 -73
  1099. data/lib/nano/hash.rb +0 -40
  1100. data/lib/nano/hash/alias.rb +0 -54
  1101. data/lib/nano/hash/assert_has_keys.rb +0 -38
  1102. data/lib/nano/hash/assert_has_only_keys.rb +0 -38
  1103. data/lib/nano/hash/at.rb +0 -26
  1104. data/lib/nano/hash/collate.rb +0 -53
  1105. data/lib/nano/hash/delete_unless.rb +0 -15
  1106. data/lib/nano/hash/each.rb +0 -61
  1107. data/lib/nano/hash/each_with_index.rb +0 -35
  1108. data/lib/nano/hash/each_with_key.rb +0 -32
  1109. data/lib/nano/hash/graph.rb +0 -31
  1110. data/lib/nano/hash/has_keys.rb +0 -37
  1111. data/lib/nano/hash/has_only_keys.rb +0 -37
  1112. data/lib/nano/hash/inverse.rb +0 -51
  1113. data/lib/nano/hash/join.rb +0 -19
  1114. data/lib/nano/hash/keys_to_iv.rb +0 -60
  1115. data/lib/nano/hash/keys_to_s.rb +0 -80
  1116. data/lib/nano/hash/keys_to_sym.rb +0 -91
  1117. data/lib/nano/hash/op_fetch.rb +0 -146
  1118. data/lib/nano/hash/op_lshift.rb +0 -28
  1119. data/lib/nano/hash/op_store.rb +0 -2
  1120. data/lib/nano/hash/rand_key.rb +0 -47
  1121. data/lib/nano/hash/rand_pair.rb +0 -50
  1122. data/lib/nano/hash/rand_value.rb +0 -60
  1123. data/lib/nano/hash/replace_each.rb +0 -33
  1124. data/lib/nano/hash/self/zipnew.rb +0 -37
  1125. data/lib/nano/hash/shuffle.rb +0 -53
  1126. data/lib/nano/hash/slice.rb +0 -33
  1127. data/lib/nano/hash/stringify_keys.rb +0 -2
  1128. data/lib/nano/hash/swap.rb +0 -36
  1129. data/lib/nano/hash/swapkey.rb +0 -44
  1130. data/lib/nano/hash/symoblize_keys.rb +0 -2
  1131. data/lib/nano/hash/to_h.rb +0 -35
  1132. data/lib/nano/hash/to_ostruct.rb +0 -40
  1133. data/lib/nano/hash/to_ostruct_recurse.rb +0 -45
  1134. data/lib/nano/hash/traverse.rb +0 -63
  1135. data/lib/nano/hash/update_each.rb +0 -43
  1136. data/lib/nano/hash/update_keys.rb +0 -31
  1137. data/lib/nano/hash/update_values.rb +0 -32
  1138. data/lib/nano/hash/variablize_keys.rb +0 -2
  1139. data/lib/nano/hash/weave.rb +0 -88
  1140. data/lib/nano/inflect.rb +0 -36
  1141. data/lib/nano/integer.rb +0 -8
  1142. data/lib/nano/integer/even.rb +0 -2
  1143. data/lib/nano/integer/fact.rb +0 -2
  1144. data/lib/nano/integer/factorial.rb +0 -47
  1145. data/lib/nano/integer/multiple.rb +0 -69
  1146. data/lib/nano/integer/odd.rb +0 -2
  1147. data/lib/nano/integer/ordinal.rb +0 -41
  1148. data/lib/nano/integer/times_collect.rb +0 -37
  1149. data/lib/nano/integer/times_map.rb +0 -28
  1150. data/lib/nano/kernel.rb +0 -65
  1151. data/lib/nano/kernel/__class__.rb +0 -31
  1152. data/lib/nano/kernel/__meta__.rb +0 -57
  1153. data/lib/nano/kernel/as.rb +0 -87
  1154. data/lib/nano/kernel/assign_from.rb +0 -82
  1155. data/lib/nano/kernel/assign_with.rb +0 -75
  1156. data/lib/nano/kernel/autoreload.rb +0 -46
  1157. data/lib/nano/kernel/autoreload_glob.rb +0 -36
  1158. data/lib/nano/kernel/bool.rb +0 -77
  1159. data/lib/nano/kernel/bug.rb +0 -39
  1160. data/lib/nano/kernel/call_stack.rb +0 -59
  1161. data/lib/nano/kernel/called.rb +0 -40
  1162. data/lib/nano/kernel/complete.rb +0 -6
  1163. data/lib/nano/kernel/constant.rb +0 -52
  1164. data/lib/nano/kernel/copy.rb +0 -48
  1165. data/lib/nano/kernel/deep_copy.rb +0 -49
  1166. data/lib/nano/kernel/demo.rb +0 -46
  1167. data/lib/nano/kernel/eigenclass.rb +0 -17
  1168. data/lib/nano/kernel/false.rb +0 -2
  1169. data/lib/nano/kernel/fn.rb +0 -33
  1170. data/lib/nano/kernel/generate_method_name.rb +0 -39
  1171. data/lib/nano/kernel/get_by_id.rb +0 -33
  1172. data/lib/nano/kernel/here.rb +0 -34
  1173. data/lib/nano/kernel/in.rb +0 -35
  1174. data/lib/nano/kernel/instance_assign.rb +0 -25
  1175. data/lib/nano/kernel/instvar.rb +0 -13
  1176. data/lib/nano/kernel/is.rb +0 -5
  1177. data/lib/nano/kernel/maybe.rb +0 -41
  1178. data/lib/nano/kernel/me.rb +0 -17
  1179. data/lib/nano/kernel/meta.rb +0 -2
  1180. data/lib/nano/kernel/metaclass.rb +0 -42
  1181. data/lib/nano/kernel/method.rb +0 -76
  1182. data/lib/nano/kernel/method_name.rb +0 -49
  1183. data/lib/nano/kernel/methods.rb +0 -79
  1184. data/lib/nano/kernel/nack.rb +0 -12
  1185. data/lib/nano/kernel/new.rb +0 -40
  1186. data/lib/nano/kernel/object_class.rb +0 -31
  1187. data/lib/nano/kernel/object_hexid.rb +0 -35
  1188. data/lib/nano/kernel/op_esc.rb +0 -37
  1189. data/lib/nano/kernel/own.rb +0 -17
  1190. data/lib/nano/kernel/p.rb +0 -12
  1191. data/lib/nano/kernel/require_all.rb +0 -44
  1192. data/lib/nano/kernel/require_esc.rb +0 -42
  1193. data/lib/nano/kernel/require_facet.rb +0 -41
  1194. data/lib/nano/kernel/require_local.rb +0 -25
  1195. data/lib/nano/kernel/resc.rb +0 -32
  1196. data/lib/nano/kernel/returning.rb +0 -49
  1197. data/lib/nano/kernel/send_as.rb +0 -34
  1198. data/lib/nano/kernel/set_from.rb +0 -69
  1199. data/lib/nano/kernel/set_with.rb +0 -74
  1200. data/lib/nano/kernel/silence_warnings.rb +0 -2
  1201. data/lib/nano/kernel/silently.rb +0 -41
  1202. data/lib/nano/kernel/singleton.rb +0 -47
  1203. data/lib/nano/kernel/superior.rb +0 -53
  1204. data/lib/nano/kernel/supermethod.rb +0 -44
  1205. data/lib/nano/kernel/this.rb +0 -33
  1206. data/lib/nano/kernel/to_b.rb +0 -41
  1207. data/lib/nano/kernel/to_bool.rb +0 -47
  1208. data/lib/nano/kernel/true.rb +0 -2
  1209. data/lib/nano/kernel/unuri.rb +0 -2
  1210. data/lib/nano/kernel/uri.rb +0 -38
  1211. data/lib/nano/kernel/val.rb +0 -52
  1212. data/lib/nano/kernel/warn_with_line.rb +0 -30
  1213. data/lib/nano/kernel/with_accessor.rb +0 -94
  1214. data/lib/nano/kernel/with_reader.rb +0 -2
  1215. data/lib/nano/kernel/with_writer.rb +0 -2
  1216. data/lib/nano/logger.rb +0 -0
  1217. data/lib/nano/logger/format.rb +0 -28
  1218. data/lib/nano/logger/format_message.rb +0 -1
  1219. data/lib/nano/matchdata.rb +0 -3
  1220. data/lib/nano/matchdata/match.rb +0 -37
  1221. data/lib/nano/matchdata/matchset.rb +0 -2
  1222. data/lib/nano/matchdata/matchtree.rb +0 -62
  1223. data/lib/nano/module.rb +0 -40
  1224. data/lib/nano/module/abstract.rb +0 -50
  1225. data/lib/nano/module/alias_module_function.rb +0 -57
  1226. data/lib/nano/module/ancestor.rb +0 -38
  1227. data/lib/nano/module/attr.rb +0 -23
  1228. data/lib/nano/module/attr_setter.rb +0 -48
  1229. data/lib/nano/module/attr_tester.rb +0 -56
  1230. data/lib/nano/module/basename.rb +0 -39
  1231. data/lib/nano/module/by_name.rb +0 -68
  1232. data/lib/nano/module/cattr_accessor.rb +0 -141
  1233. data/lib/nano/module/cattr_reader.rb +0 -2
  1234. data/lib/nano/module/cattr_writer.rb +0 -2
  1235. data/lib/nano/module/clone_removing.rb +0 -2
  1236. data/lib/nano/module/clone_renaming.rb +0 -2
  1237. data/lib/nano/module/clone_using.rb +0 -87
  1238. data/lib/nano/module/dirname.rb +0 -42
  1239. data/lib/nano/module/equate_on.rb +0 -70
  1240. data/lib/nano/module/generate_instance_method_name.rb +0 -47
  1241. data/lib/nano/module/include_as.rb +0 -102
  1242. data/lib/nano/module/initializer.rb +0 -65
  1243. data/lib/nano/module/instance_methods.rb +0 -186
  1244. data/lib/nano/module/integrate.rb +0 -48
  1245. data/lib/nano/module/is.rb +0 -34
  1246. data/lib/nano/module/memoize.rb +0 -95
  1247. data/lib/nano/module/modspace.rb +0 -43
  1248. data/lib/nano/module/namespace.rb +0 -61
  1249. data/lib/nano/module/nesting.rb +0 -45
  1250. data/lib/nano/module/redef.rb +0 -31
  1251. data/lib/nano/module/redefine_method.rb +0 -57
  1252. data/lib/nano/module/redirect.rb +0 -30
  1253. data/lib/nano/module/redirect_method.rb +0 -64
  1254. data/lib/nano/module/remove.rb +0 -29
  1255. data/lib/nano/module/rename.rb +0 -31
  1256. data/lib/nano/module/rename_method.rb +0 -38
  1257. data/lib/nano/module/revisal.rb +0 -49
  1258. data/lib/nano/module/shadow_all.rb +0 -17
  1259. data/lib/nano/module/shadow_method.rb +0 -42
  1260. data/lib/nano/module/sort_on.rb +0 -73
  1261. data/lib/nano/module/undef.rb +0 -29
  1262. data/lib/nano/module/wrap.rb +0 -30
  1263. data/lib/nano/module/wrap_method.rb +0 -48
  1264. data/lib/nano/nil_as_emptiness.rb +0 -34
  1265. data/lib/nano/nilclass.rb +0 -7
  1266. data/lib/nano/nilclass/empty.rb +0 -32
  1267. data/lib/nano/nilclass/include.rb +0 -32
  1268. data/lib/nano/nilclass/length.rb +0 -2
  1269. data/lib/nano/nilclass/op_fetch.rb +0 -37
  1270. data/lib/nano/nilclass/size.rb +0 -44
  1271. data/lib/nano/nilclass/to_f.rb +0 -32
  1272. data/lib/nano/nilclass/to_h.rb +0 -33
  1273. data/lib/nano/numeric.rb +0 -5
  1274. data/lib/nano/numeric/ceil_multiple.rb +0 -40
  1275. data/lib/nano/numeric/pred.rb +0 -2
  1276. data/lib/nano/numeric/succ.rb +0 -69
  1277. data/lib/nano/numeric/to_b.rb +0 -38
  1278. data/lib/nano/ostruct.rb +0 -0
  1279. data/lib/nano/ostruct/__merge__.rb +0 -52
  1280. data/lib/nano/ostruct/__table__.rb +0 -17
  1281. data/lib/nano/ostruct/__update__.rb +0 -45
  1282. data/lib/nano/ostruct/op_fetch.rb +0 -40
  1283. data/lib/nano/ostruct/op_store.rb +0 -42
  1284. data/lib/nano/ostruct/to_h.rb +0 -8
  1285. data/lib/nano/pathname.rb +0 -2
  1286. data/lib/nano/pathname/ascend.rb +0 -22
  1287. data/lib/nano/pathname/descend.rb +0 -20
  1288. data/lib/nano/proc.rb +0 -3
  1289. data/lib/nano/proc/compose.rb +0 -62
  1290. data/lib/nano/proc/op_mul.rb +0 -2
  1291. data/lib/nano/proc/to_method.rb +0 -74
  1292. data/lib/nano/random.rb +0 -21
  1293. data/lib/nano/range.rb +0 -4
  1294. data/lib/nano/range/to_r.rb +0 -32
  1295. data/lib/nano/range/to_range.rb +0 -36
  1296. data/lib/nano/range/umbrella.rb +0 -67
  1297. data/lib/nano/range/within.rb +0 -44
  1298. data/lib/nano/regexp.rb +0 -3
  1299. data/lib/nano/regexp/arity.rb +0 -41
  1300. data/lib/nano/regexp/to_re.rb +0 -38
  1301. data/lib/nano/regexp/to_regexp.rb +0 -36
  1302. data/lib/nano/string.rb +0 -86
  1303. data/lib/nano/string/align_center.rb +0 -87
  1304. data/lib/nano/string/align_left.rb +0 -2
  1305. data/lib/nano/string/align_right.rb +0 -2
  1306. data/lib/nano/string/at.rb +0 -8
  1307. data/lib/nano/string/at_rand.rb +0 -65
  1308. data/lib/nano/string/basename.rb +0 -48
  1309. data/lib/nano/string/blank.rb +0 -36
  1310. data/lib/nano/string/bracket.rb +0 -70
  1311. data/lib/nano/string/brief.rb +0 -33
  1312. data/lib/nano/string/bytes.rb +0 -19
  1313. data/lib/nano/string/camelcase.rb +0 -58
  1314. data/lib/nano/string/camelize.rb +0 -35
  1315. data/lib/nano/string/capitalized.rb +0 -38
  1316. data/lib/nano/string/chars.rb +0 -34
  1317. data/lib/nano/string/cmp.rb +0 -43
  1318. data/lib/nano/string/demodulize.rb +0 -40
  1319. data/lib/nano/string/dequote.rb +0 -29
  1320. data/lib/nano/string/downcase.rb +0 -37
  1321. data/lib/nano/string/dresner.rb +0 -49
  1322. data/lib/nano/string/each_char.rb +0 -35
  1323. data/lib/nano/string/each_word.rb +0 -50
  1324. data/lib/nano/string/ends_with.rb +0 -2
  1325. data/lib/nano/string/first.rb +0 -94
  1326. data/lib/nano/string/first_char.rb +0 -20
  1327. data/lib/nano/string/fold.rb +0 -67
  1328. data/lib/nano/string/format.rb +0 -17
  1329. data/lib/nano/string/frequency.rb +0 -39
  1330. data/lib/nano/string/humanize.rb +0 -31
  1331. data/lib/nano/string/indent.rb +0 -68
  1332. data/lib/nano/string/index_all.rb +0 -40
  1333. data/lib/nano/string/last.rb +0 -94
  1334. data/lib/nano/string/last_char.rb +0 -22
  1335. data/lib/nano/string/line_wrap.rb +0 -77
  1336. data/lib/nano/string/lines.rb +0 -33
  1337. data/lib/nano/string/lowercase.rb +0 -32
  1338. data/lib/nano/string/margin.rb +0 -138
  1339. data/lib/nano/string/mscan.rb +0 -42
  1340. data/lib/nano/string/natcmp.rb +0 -108
  1341. data/lib/nano/string/nchar.rb +0 -45
  1342. data/lib/nano/string/ordinal.rb +0 -16
  1343. data/lib/nano/string/plural.rb +0 -2
  1344. data/lib/nano/string/pop.rb +0 -54
  1345. data/lib/nano/string/probability.rb +0 -34
  1346. data/lib/nano/string/pull.rb +0 -17
  1347. data/lib/nano/string/push.rb +0 -44
  1348. data/lib/nano/string/quote.rb +0 -68
  1349. data/lib/nano/string/rand_byte.rb +0 -55
  1350. data/lib/nano/string/rand_index.rb +0 -29
  1351. data/lib/nano/string/range.rb +0 -37
  1352. data/lib/nano/string/range_all.rb +0 -48
  1353. data/lib/nano/string/range_of_line.rb +0 -42
  1354. data/lib/nano/string/self/format.rb +0 -17
  1355. data/lib/nano/string/self/interpolate.rb +0 -31
  1356. data/lib/nano/string/self/patterns.rb +0 -51
  1357. data/lib/nano/string/self/rand_letter.rb +0 -34
  1358. data/lib/nano/string/self/random.rb +0 -36
  1359. data/lib/nano/string/shatter.rb +0 -45
  1360. data/lib/nano/string/shift.rb +0 -42
  1361. data/lib/nano/string/shuffle.rb +0 -42
  1362. data/lib/nano/string/similarity.rb +0 -105
  1363. data/lib/nano/string/singular.rb +0 -117
  1364. data/lib/nano/string/slap.rb +0 -44
  1365. data/lib/nano/string/soundex.rb +0 -102
  1366. data/lib/nano/string/starts_with.rb +0 -24
  1367. data/lib/nano/string/succ.rb +0 -38
  1368. data/lib/nano/string/tab.rb +0 -2
  1369. data/lib/nano/string/tabto.rb +0 -2
  1370. data/lib/nano/string/to_a.rb +0 -35
  1371. data/lib/nano/string/to_arr.rb +0 -55
  1372. data/lib/nano/string/to_b.rb +0 -64
  1373. data/lib/nano/string/to_const.rb +0 -39
  1374. data/lib/nano/string/to_date.rb +0 -35
  1375. data/lib/nano/string/to_proc.rb +0 -54
  1376. data/lib/nano/string/to_re.rb +0 -37
  1377. data/lib/nano/string/to_time.rb +0 -34
  1378. data/lib/nano/string/unbracket.rb +0 -46
  1379. data/lib/nano/string/underscore.rb +0 -18
  1380. data/lib/nano/string/unix_crypt.rb +0 -41
  1381. data/lib/nano/string/unpack.rb +0 -45
  1382. data/lib/nano/string/unshift.rb +0 -42
  1383. data/lib/nano/string/upcase.rb +0 -45
  1384. data/lib/nano/string/uppercase.rb +0 -2
  1385. data/lib/nano/string/whitespace.rb +0 -27
  1386. data/lib/nano/string/word_filter.rb +0 -61
  1387. data/lib/nano/string/word_wrap.rb +0 -90
  1388. data/lib/nano/string/words.rb +0 -35
  1389. data/lib/nano/string_as_array.rb +0 -16
  1390. data/lib/nano/symbol.rb +0 -13
  1391. data/lib/nano/symbol/camelcase.rb +0 -42
  1392. data/lib/nano/symbol/camelize.rb +0 -33
  1393. data/lib/nano/symbol/capitalize.rb +0 -31
  1394. data/lib/nano/symbol/capitalized.rb +0 -33
  1395. data/lib/nano/symbol/downcase.rb +0 -36
  1396. data/lib/nano/symbol/not.rb +0 -40
  1397. data/lib/nano/symbol/pad.rb +0 -43
  1398. data/lib/nano/symbol/succ.rb +0 -42
  1399. data/lib/nano/symbol/to_const.rb +0 -40
  1400. data/lib/nano/symbol/to_proc.rb +0 -45
  1401. data/lib/nano/symbol/to_str.rb +0 -39
  1402. data/lib/nano/symbol/underscore.rb +0 -32
  1403. data/lib/nano/symbol/upcase.rb +0 -37
  1404. data/lib/nano/time.rb +0 -7
  1405. data/lib/nano/time/change.rb +0 -51
  1406. data/lib/nano/time/elapse.rb +0 -41
  1407. data/lib/nano/time/self/days_extrema.rb +0 -22
  1408. data/lib/nano/time/stamp.rb +0 -47
  1409. data/lib/nano/time/to_date.rb +0 -37
  1410. data/lib/nano/time/to_s.rb +0 -33
  1411. data/lib/nano/time/to_time.rb +0 -36
  1412. data/lib/nano/unboundmethod.rb +0 -1
  1413. data/lib/nano/unboundmethod/name.rb +0 -8
  1414. data/lib/unit/methodprobe.rb +0 -215
  1415. data/lib/unit/quicktest.rb +0 -36
  1416. data/lib/unit/test.rb +0 -145
  1417. data/test/lib/mega/test_annotation.rb +0 -217
  1418. data/test/lib/mega/test_ansicolor.rb +0 -36
  1419. data/test/lib/mega/test_bbcode.rb +0 -34
  1420. data/test/lib/mega/test_binary_multiplier.rb +0 -84
  1421. data/test/lib/mega/test_byteorder.rb +0 -56
  1422. data/test/lib/mega/test_class_inherit.rb +0 -118
  1423. data/test/lib/mega/test_classmethods.rb +0 -47
  1424. data/test/lib/mega/test_constants.rb +0 -18
  1425. data/test/lib/mega/test_coroutine.rb +0 -60
  1426. data/test/lib/mega/test_crosscase.rb +0 -45
  1427. data/test/lib/mega/test_dictionary.rb +0 -90
  1428. data/test/lib/mega/test_dynamod.rb +0 -62
  1429. data/test/lib/mega/test_enumerable_args.rb +0 -80
  1430. data/test/lib/mega/test_enumtype.rb +0 -25
  1431. data/test/lib/mega/test_expirable.rb +0 -25
  1432. data/test/lib/mega/test_filelist.rb +0 -40
  1433. data/test/lib/mega/test_fixnum_const.rb +0 -25
  1434. data/test/lib/mega/test_floatstring.rb +0 -36
  1435. data/test/lib/mega/test_functor.rb +0 -39
  1436. data/test/lib/mega/test_harray.rb +0 -294
  1437. data/test/lib/mega/test_heap.rb +0 -18
  1438. data/test/lib/mega/test_infinity.rb +0 -36
  1439. data/test/lib/mega/test_inheritor.rb +0 -155
  1440. data/test/lib/mega/test_interval.rb +0 -119
  1441. data/test/lib/mega/test_lisp.rb +0 -47
  1442. data/test/lib/mega/test_lru_cache.rb +0 -25
  1443. data/test/lib/mega/test_mock.rb +0 -36
  1444. data/test/lib/mega/test_multiplier.rb +0 -114
  1445. data/test/lib/mega/test_multiton.rb +0 -200
  1446. data/test/lib/mega/test_nack.rb +0 -45
  1447. data/test/lib/mega/test_nilcomparable.rb +0 -43
  1448. data/test/lib/mega/test_notcopyable.rb +0 -74
  1449. data/test/lib/mega/test_openobject.rb +0 -66
  1450. data/test/lib/mega/test_ostructable.rb +0 -43
  1451. data/test/lib/mega/test_package.rb +0 -39
  1452. data/test/lib/mega/test_promoteself.rb +0 -45
  1453. data/test/lib/mega/test_snapshot.rb +0 -34
  1454. data/test/lib/mega/test_statichash.rb +0 -31
  1455. data/test/lib/mega/test_superstruct.rb +0 -334
  1456. data/test/lib/mega/test_syncarray.rb +0 -28
  1457. data/test/lib/mega/test_synchash.rb +0 -28
  1458. data/test/lib/mega/test_tagiter.rb +0 -93
  1459. data/test/lib/mega/test_time_in_english.rb +0 -73
  1460. data/test/lib/mega/test_timer.rb +0 -66
  1461. data/test/lib/mega/test_tuple.rb +0 -32
  1462. data/test/lib/mega/test_uninheritable.rb +0 -42
  1463. data/test/lib/mega/test_units.rb +0 -104
  1464. data/test/lib/mega/test_version.rb +0 -104
  1465. data/test/lib/nano/array/test_at_rand.rb +0 -34
  1466. data/test/lib/nano/array/test_body.rb +0 -27
  1467. data/test/lib/nano/array/test_delete_unless.rb +0 -28
  1468. data/test/lib/nano/array/test_delete_values.rb +0 -28
  1469. data/test/lib/nano/array/test_delete_values_at.rb +0 -31
  1470. data/test/lib/nano/array/test_first.rb +0 -34
  1471. data/test/lib/nano/array/test_foot.rb +0 -27
  1472. data/test/lib/nano/array/test_head.rb +0 -27
  1473. data/test/lib/nano/array/test_last.rb +0 -34
  1474. data/test/lib/nano/array/test_last_index.rb +0 -26
  1475. data/test/lib/nano/array/test_merge.rb +0 -35
  1476. data/test/lib/nano/array/test_mid.rb +0 -33
  1477. data/test/lib/nano/array/test_middle.rb +0 -29
  1478. data/test/lib/nano/array/test_op_fetch.rb +0 -27
  1479. data/test/lib/nano/array/test_op_store.rb +0 -30
  1480. data/test/lib/nano/array/test_pick.rb +0 -40
  1481. data/test/lib/nano/array/test_pos.rb +0 -28
  1482. data/test/lib/nano/array/test_pull.rb +0 -28
  1483. data/test/lib/nano/array/test_rand_index.rb +0 -29
  1484. data/test/lib/nano/array/test_rand_subset.rb +0 -29
  1485. data/test/lib/nano/array/test_range.rb +0 -32
  1486. data/test/lib/nano/array/test_rotate.rb +0 -36
  1487. data/test/lib/nano/array/test_select.rb +0 -28
  1488. data/test/lib/nano/array/test_shuffle.rb +0 -35
  1489. data/test/lib/nano/array/test_slap.rb +0 -28
  1490. data/test/lib/nano/array/test_tail.rb +0 -27
  1491. data/test/lib/nano/array/test_thru.rb +0 -27
  1492. data/test/lib/nano/array/test_to_b.rb +0 -27
  1493. data/test/lib/nano/array/test_to_h.rb +0 -33
  1494. data/test/lib/nano/array/test_to_hash.rb +0 -27
  1495. data/test/lib/nano/binding/self/test_of_caller.rb +0 -35
  1496. data/test/lib/nano/binding/test___LINE__.rb +0 -43
  1497. data/test/lib/nano/binding/test_call_stack.rb +0 -34
  1498. data/test/lib/nano/binding/test_called.rb +0 -30
  1499. data/test/lib/nano/binding/test_caller.rb +0 -35
  1500. data/test/lib/nano/binding/test_defined.rb +0 -34
  1501. data/test/lib/nano/binding/test_eval.rb +0 -34
  1502. data/test/lib/nano/binding/test_local_variables.rb +0 -34
  1503. data/test/lib/nano/binding/test_method_name.rb +0 -34
  1504. data/test/lib/nano/binding/test_op_fetch.rb +0 -34
  1505. data/test/lib/nano/binding/test_op_store.rb +0 -35
  1506. data/test/lib/nano/binding/test_self.rb +0 -34
  1507. data/test/lib/nano/class/test_descendents.rb +0 -30
  1508. data/test/lib/nano/class/test_remove_descendents.rb +0 -32
  1509. data/test/lib/nano/comparable/test_at_least.rb +0 -34
  1510. data/test/lib/nano/comparable/test_clip.rb +0 -44
  1511. data/test/lib/nano/comparable/test_cmp.rb +0 -28
  1512. data/test/lib/nano/continuation/self/test_create.rb +0 -26
  1513. data/test/lib/nano/date/test_days_in_month.rb +0 -30
  1514. data/test/lib/nano/date/test_days_of_month.rb +0 -30
  1515. data/test/lib/nano/date/test_stamp.rb +0 -38
  1516. data/test/lib/nano/date/test_to_date.rb +0 -30
  1517. data/test/lib/nano/date/test_to_s.rb +0 -30
  1518. data/test/lib/nano/date/test_to_time.rb +0 -30
  1519. data/test/lib/nano/dir/self/test_ancestor.rb +0 -26
  1520. data/test/lib/nano/dir/self/test_ascend.rb +0 -41
  1521. data/test/lib/nano/dir/self/test_ls_r.rb +0 -52
  1522. data/test/lib/nano/enumerable/self/test_combinations.rb +0 -43
  1523. data/test/lib/nano/enumerable/self/test_cross.rb +0 -31
  1524. data/test/lib/nano/enumerable/test_collect_with_index.rb +0 -27
  1525. data/test/lib/nano/enumerable/test_commonality.rb +0 -31
  1526. data/test/lib/nano/enumerable/test_compact_collect.rb +0 -27
  1527. data/test/lib/nano/enumerable/test_cross.rb +0 -30
  1528. data/test/lib/nano/enumerable/test_each_combination.rb +0 -29
  1529. data/test/lib/nano/enumerable/test_each_pair.rb +0 -29
  1530. data/test/lib/nano/enumerable/test_each_slice.rb +0 -74
  1531. data/test/lib/nano/enumerable/test_each_unique_pair.rb +0 -29
  1532. data/test/lib/nano/enumerable/test_entropy.rb +0 -26
  1533. data/test/lib/nano/enumerable/test_every.rb +0 -35
  1534. data/test/lib/nano/enumerable/test_ew.rb +0 -31
  1535. data/test/lib/nano/enumerable/test_filter_collect.rb +0 -31
  1536. data/test/lib/nano/enumerable/test_find_collisions.rb +0 -30
  1537. data/test/lib/nano/enumerable/test_frequency.rb +0 -27
  1538. data/test/lib/nano/enumerable/test_graph.rb +0 -30
  1539. data/test/lib/nano/enumerable/test_ideal_entropy.rb +0 -27
  1540. data/test/lib/nano/enumerable/test_none.rb +0 -33
  1541. data/test/lib/nano/enumerable/test_occur.rb +0 -30
  1542. data/test/lib/nano/enumerable/test_one.rb +0 -35
  1543. data/test/lib/nano/enumerable/test_op_pow.rb +0 -27
  1544. data/test/lib/nano/enumerable/test_partition_by.rb +0 -31
  1545. data/test/lib/nano/enumerable/test_probability.rb +0 -27
  1546. data/test/lib/nano/enumerable/test_to_h.rb +0 -27
  1547. data/test/lib/nano/enumerable/test_uniq_by.rb +0 -28
  1548. data/test/lib/nano/file/self/test_create.rb +0 -39
  1549. data/test/lib/nano/file/self/test_open_as_string.rb +0 -40
  1550. data/test/lib/nano/file/self/test_read_list.rb +0 -37
  1551. data/test/lib/nano/file/self/test_sanitize.rb +0 -46
  1552. data/test/lib/nano/file/self/test_split_all.rb +0 -27
  1553. data/test/lib/nano/fileutils/test_slice.rb +0 -96
  1554. data/test/lib/nano/fileutils/test_wc.rb +0 -68
  1555. data/test/lib/nano/fileutils/test_which.rb +0 -61
  1556. data/test/lib/nano/float/test_approx.rb +0 -28
  1557. data/test/lib/nano/float/test_round_at.rb +0 -46
  1558. data/test/lib/nano/float/test_round_to.rb +0 -46
  1559. data/test/lib/nano/hash/self/test_zipnew.rb +0 -28
  1560. data/test/lib/nano/hash/test_alias.rb +0 -31
  1561. data/test/lib/nano/hash/test_assert_has_keys.rb +0 -27
  1562. data/test/lib/nano/hash/test_assert_has_only_keys.rb +0 -27
  1563. data/test/lib/nano/hash/test_at.rb +0 -28
  1564. data/test/lib/nano/hash/test_collate.rb +0 -35
  1565. data/test/lib/nano/hash/test_each.rb +0 -36
  1566. data/test/lib/nano/hash/test_each_with_index.rb +0 -29
  1567. data/test/lib/nano/hash/test_each_with_key.rb +0 -29
  1568. data/test/lib/nano/hash/test_graph.rb +0 -28
  1569. data/test/lib/nano/hash/test_has_keys.rb +0 -27
  1570. data/test/lib/nano/hash/test_has_only_keys.rb +0 -27
  1571. data/test/lib/nano/hash/test_inverse.rb +0 -28
  1572. data/test/lib/nano/hash/test_keys_to_s.rb +0 -34
  1573. data/test/lib/nano/hash/test_keys_to_sym.rb +0 -34
  1574. data/test/lib/nano/hash/test_op_fetch.rb +0 -111
  1575. data/test/lib/nano/hash/test_op_lshift.rb +0 -29
  1576. data/test/lib/nano/hash/test_rand_key.rb +0 -27
  1577. data/test/lib/nano/hash/test_rand_pair.rb +0 -27
  1578. data/test/lib/nano/hash/test_rand_value.rb +0 -27
  1579. data/test/lib/nano/hash/test_replace_each.rb +0 -29
  1580. data/test/lib/nano/hash/test_shuffle.rb +0 -32
  1581. data/test/lib/nano/hash/test_slice.rb +0 -27
  1582. data/test/lib/nano/hash/test_swap.rb +0 -27
  1583. data/test/lib/nano/hash/test_swapkey.rb +0 -29
  1584. data/test/lib/nano/hash/test_to_h.rb +0 -27
  1585. data/test/lib/nano/hash/test_to_ostruct.rb +0 -30
  1586. data/test/lib/nano/hash/test_to_ostruct_recurse.rb +0 -30
  1587. data/test/lib/nano/hash/test_traverse.rb +0 -37
  1588. data/test/lib/nano/hash/test_update_each.rb +0 -29
  1589. data/test/lib/nano/hash/test_update_keys.rb +0 -28
  1590. data/test/lib/nano/hash/test_update_values.rb +0 -28
  1591. data/test/lib/nano/hash/test_weave.rb +0 -29
  1592. data/test/lib/nano/integer/test_factorial.rb +0 -30
  1593. data/test/lib/nano/integer/test_multiple.rb +0 -43
  1594. data/test/lib/nano/integer/test_ordinal.rb +0 -29
  1595. data/test/lib/nano/integer/test_times_collect.rb +0 -28
  1596. data/test/lib/nano/integer/test_times_map.rb +0 -28
  1597. data/test/lib/nano/kernel/test___class__.rb +0 -26
  1598. data/test/lib/nano/kernel/test_as.rb +0 -42
  1599. data/test/lib/nano/kernel/test_assign_from.rb +0 -31
  1600. data/test/lib/nano/kernel/test_assign_with.rb +0 -31
  1601. data/test/lib/nano/kernel/test_bool.rb +0 -41
  1602. data/test/lib/nano/kernel/test_bug.rb +0 -26
  1603. data/test/lib/nano/kernel/test_call_stack.rb +0 -26
  1604. data/test/lib/nano/kernel/test_called.rb +0 -26
  1605. data/test/lib/nano/kernel/test_constant.rb +0 -33
  1606. data/test/lib/nano/kernel/test_copy.rb +0 -40
  1607. data/test/lib/nano/kernel/test_deep_copy.rb +0 -40
  1608. data/test/lib/nano/kernel/test_demo.rb +0 -28
  1609. data/test/lib/nano/kernel/test_fn.rb +0 -26
  1610. data/test/lib/nano/kernel/test_generate_method_name.rb +0 -26
  1611. data/test/lib/nano/kernel/test_get_by_id.rb +0 -28
  1612. data/test/lib/nano/kernel/test_here.rb +0 -26
  1613. data/test/lib/nano/kernel/test_in.rb +0 -27
  1614. data/test/lib/nano/kernel/test_maybe.rb +0 -26
  1615. data/test/lib/nano/kernel/test_metaclass.rb +0 -34
  1616. data/test/lib/nano/kernel/test_method.rb +0 -32
  1617. data/test/lib/nano/kernel/test_method_name.rb +0 -31
  1618. data/test/lib/nano/kernel/test_methods.rb +0 -50
  1619. data/test/lib/nano/kernel/test_new.rb +0 -30
  1620. data/test/lib/nano/kernel/test_object_class.rb +0 -26
  1621. data/test/lib/nano/kernel/test_object_hexid.rb +0 -27
  1622. data/test/lib/nano/kernel/test_require_all.rb +0 -26
  1623. data/test/lib/nano/kernel/test_require_esc.rb +0 -27
  1624. data/test/lib/nano/kernel/test_require_facet.rb +0 -27
  1625. data/test/lib/nano/kernel/test_resc.rb +0 -27
  1626. data/test/lib/nano/kernel/test_returning.rb +0 -30
  1627. data/test/lib/nano/kernel/test_send_as.rb +0 -26
  1628. data/test/lib/nano/kernel/test_set_from.rb +0 -33
  1629. data/test/lib/nano/kernel/test_set_with.rb +0 -33
  1630. data/test/lib/nano/kernel/test_silently.rb +0 -28
  1631. data/test/lib/nano/kernel/test_singleton.rb +0 -40
  1632. data/test/lib/nano/kernel/test_superior.rb +0 -30
  1633. data/test/lib/nano/kernel/test_supermethod.rb +0 -33
  1634. data/test/lib/nano/kernel/test_this.rb +0 -26
  1635. data/test/lib/nano/kernel/test_to_b.rb +0 -28
  1636. data/test/lib/nano/kernel/test_to_bool.rb +0 -28
  1637. data/test/lib/nano/kernel/test_uri.rb +0 -30
  1638. data/test/lib/nano/kernel/test_val.rb +0 -43
  1639. data/test/lib/nano/kernel/test_with_accessor.rb +0 -51
  1640. data/test/lib/nano/matchdata/test_match.rb +0 -29
  1641. data/test/lib/nano/matchdata/test_matchtree.rb +0 -32
  1642. data/test/lib/nano/module/test_abstract.rb +0 -36
  1643. data/test/lib/nano/module/test_alias_module_function.rb +0 -34
  1644. data/test/lib/nano/module/test_ancestor.rb +0 -26
  1645. data/test/lib/nano/module/test_basename.rb +0 -26
  1646. data/test/lib/nano/module/test_by_name.rb +0 -29
  1647. data/test/lib/nano/module/test_cattr_accessor.rb +0 -55
  1648. data/test/lib/nano/module/test_clone_using.rb +0 -55
  1649. data/test/lib/nano/module/test_dirname.rb +0 -26
  1650. data/test/lib/nano/module/test_equate_on.rb +0 -37
  1651. data/test/lib/nano/module/test_generate_instance_method_name.rb +0 -33
  1652. data/test/lib/nano/module/test_include_as.rb +0 -35
  1653. data/test/lib/nano/module/test_initializer.rb +0 -32
  1654. data/test/lib/nano/module/test_instance_methods.rb +0 -59
  1655. data/test/lib/nano/module/test_integrate.rb +0 -35
  1656. data/test/lib/nano/module/test_memoize.rb +0 -50
  1657. data/test/lib/nano/module/test_modspace.rb +0 -27
  1658. data/test/lib/nano/module/test_namespace.rb +0 -33
  1659. data/test/lib/nano/module/test_nesting.rb +0 -36
  1660. data/test/lib/nano/module/test_redef.rb +0 -30
  1661. data/test/lib/nano/module/test_redefine_method.rb +0 -30
  1662. data/test/lib/nano/module/test_redirect.rb +0 -30
  1663. data/test/lib/nano/module/test_redirect_method.rb +0 -30
  1664. data/test/lib/nano/module/test_remove.rb +0 -30
  1665. data/test/lib/nano/module/test_rename.rb +0 -31
  1666. data/test/lib/nano/module/test_rename_method.rb +0 -31
  1667. data/test/lib/nano/module/test_revisal.rb +0 -35
  1668. data/test/lib/nano/module/test_shadow_method.rb +0 -30
  1669. data/test/lib/nano/module/test_sort_on.rb +0 -42
  1670. data/test/lib/nano/module/test_undef.rb +0 -30
  1671. data/test/lib/nano/module/test_wrap.rb +0 -30
  1672. data/test/lib/nano/module/test_wrap_method.rb +0 -30
  1673. data/test/lib/nano/nilclass/test_empty.rb +0 -26
  1674. data/test/lib/nano/nilclass/test_include.rb +0 -26
  1675. data/test/lib/nano/nilclass/test_op_fetch.rb +0 -28
  1676. data/test/lib/nano/nilclass/test_size.rb +0 -30
  1677. data/test/lib/nano/nilclass/test_to_f.rb +0 -26
  1678. data/test/lib/nano/nilclass/test_to_h.rb +0 -26
  1679. data/test/lib/nano/numeric/test_ceil_multiple.rb +0 -31
  1680. data/test/lib/nano/numeric/test_succ.rb +0 -40
  1681. data/test/lib/nano/numeric/test_to_b.rb +0 -27
  1682. data/test/lib/nano/ostruct/test___merge__.rb +0 -38
  1683. data/test/lib/nano/ostruct/test___update__.rb +0 -29
  1684. data/test/lib/nano/ostruct/test_op_fetch.rb +0 -27
  1685. data/test/lib/nano/ostruct/test_op_store.rb +0 -28
  1686. data/test/lib/nano/proc/test_compose.rb +0 -36
  1687. data/test/lib/nano/proc/test_to_method.rb +0 -31
  1688. data/test/lib/nano/range/test_to_r.rb +0 -27
  1689. data/test/lib/nano/range/test_to_range.rb +0 -27
  1690. data/test/lib/nano/range/test_umbrella.rb +0 -34
  1691. data/test/lib/nano/range/test_within.rb +0 -29
  1692. data/test/lib/nano/regexp/test_arity.rb +0 -33
  1693. data/test/lib/nano/regexp/test_to_re.rb +0 -27
  1694. data/test/lib/nano/regexp/test_to_regexp.rb +0 -27
  1695. data/test/lib/nano/string/self/test_interpolate.rb +0 -27
  1696. data/test/lib/nano/string/self/test_patterns.rb +0 -28
  1697. data/test/lib/nano/string/self/test_rand_letter.rb +0 -26
  1698. data/test/lib/nano/string/test_align_center.rb +0 -34
  1699. data/test/lib/nano/string/test_at_rand.rb +0 -35
  1700. data/test/lib/nano/string/test_basename.rb +0 -41
  1701. data/test/lib/nano/string/test_blank.rb +0 -27
  1702. data/test/lib/nano/string/test_bracket.rb +0 -49
  1703. data/test/lib/nano/string/test_camelcase.rb +0 -39
  1704. data/test/lib/nano/string/test_camelize.rb +0 -26
  1705. data/test/lib/nano/string/test_capitalized.rb +0 -26
  1706. data/test/lib/nano/string/test_chars.rb +0 -27
  1707. data/test/lib/nano/string/test_cmp.rb +0 -30
  1708. data/test/lib/nano/string/test_demodulize.rb +0 -38
  1709. data/test/lib/nano/string/test_downcase.rb +0 -26
  1710. data/test/lib/nano/string/test_dresner.rb +0 -32
  1711. data/test/lib/nano/string/test_each_char.rb +0 -29
  1712. data/test/lib/nano/string/test_each_word.rb +0 -29
  1713. data/test/lib/nano/string/test_first.rb +0 -43
  1714. data/test/lib/nano/string/test_fold.rb +0 -28
  1715. data/test/lib/nano/string/test_frequency.rb +0 -28
  1716. data/test/lib/nano/string/test_humanize.rb +0 -26
  1717. data/test/lib/nano/string/test_indent.rb +0 -40
  1718. data/test/lib/nano/string/test_index_all.rb +0 -26
  1719. data/test/lib/nano/string/test_last.rb +0 -46
  1720. data/test/lib/nano/string/test_line_wrap.rb +0 -27
  1721. data/test/lib/nano/string/test_lines.rb +0 -26
  1722. data/test/lib/nano/string/test_lowercase.rb +0 -26
  1723. data/test/lib/nano/string/test_margin.rb +0 -117
  1724. data/test/lib/nano/string/test_mscan.rb +0 -30
  1725. data/test/lib/nano/string/test_natcmp.rb +0 -30
  1726. data/test/lib/nano/string/test_nchar.rb +0 -29
  1727. data/test/lib/nano/string/test_pop.rb +0 -47
  1728. data/test/lib/nano/string/test_probability.rb +0 -28
  1729. data/test/lib/nano/string/test_push.rb +0 -40
  1730. data/test/lib/nano/string/test_quote.rb +0 -49
  1731. data/test/lib/nano/string/test_rand_byte.rb +0 -35
  1732. data/test/lib/nano/string/test_rand_index.rb +0 -26
  1733. data/test/lib/nano/string/test_range.rb +0 -27
  1734. data/test/lib/nano/string/test_range_all.rb +0 -27
  1735. data/test/lib/nano/string/test_range_of_line.rb +0 -28
  1736. data/test/lib/nano/string/test_shatter.rb +0 -29
  1737. data/test/lib/nano/string/test_shift.rb +0 -40
  1738. data/test/lib/nano/string/test_shuffle.rb +0 -27
  1739. data/test/lib/nano/string/test_similarity.rb +0 -26
  1740. data/test/lib/nano/string/test_singular.rb +0 -32
  1741. data/test/lib/nano/string/test_slap.rb +0 -40
  1742. data/test/lib/nano/string/test_soundex.rb +0 -41
  1743. data/test/lib/nano/string/test_succ.rb +0 -29
  1744. data/test/lib/nano/string/test_to_a.rb +0 -27
  1745. data/test/lib/nano/string/test_to_arr.rb +0 -26
  1746. data/test/lib/nano/string/test_to_b.rb +0 -41
  1747. data/test/lib/nano/string/test_to_const.rb +0 -28
  1748. data/test/lib/nano/string/test_to_date.rb +0 -30
  1749. data/test/lib/nano/string/test_to_proc.rb +0 -33
  1750. data/test/lib/nano/string/test_to_re.rb +0 -28
  1751. data/test/lib/nano/string/test_to_time.rb +0 -30
  1752. data/test/lib/nano/string/test_unix_crypt.rb +0 -30
  1753. data/test/lib/nano/string/test_unpack.rb +0 -34
  1754. data/test/lib/nano/string/test_unshift.rb +0 -39
  1755. data/test/lib/nano/string/test_upcase.rb +0 -30
  1756. data/test/lib/nano/string/test_whitespace.rb +0 -27
  1757. data/test/lib/nano/string/test_word_filter.rb +0 -34
  1758. data/test/lib/nano/string/test_word_wrap.rb +0 -51
  1759. data/test/lib/nano/string/test_words.rb +0 -27
  1760. data/test/lib/nano/symbol/test_camelcase.rb +0 -26
  1761. data/test/lib/nano/symbol/test_camelize.rb +0 -27
  1762. data/test/lib/nano/symbol/test_capitalize.rb +0 -26
  1763. data/test/lib/nano/symbol/test_capitalized.rb +0 -27
  1764. data/test/lib/nano/symbol/test_downcase.rb +0 -27
  1765. data/test/lib/nano/symbol/test_not.rb +0 -29
  1766. data/test/lib/nano/symbol/test_pad.rb +0 -27
  1767. data/test/lib/nano/symbol/test_succ.rb +0 -28
  1768. data/test/lib/nano/symbol/test_to_const.rb +0 -28
  1769. data/test/lib/nano/symbol/test_to_proc.rb +0 -27
  1770. data/test/lib/nano/symbol/test_to_str.rb +0 -28
  1771. data/test/lib/nano/symbol/test_underscore.rb +0 -26
  1772. data/test/lib/nano/symbol/test_upcase.rb +0 -27
  1773. data/test/lib/nano/time/test_change.rb +0 -33
  1774. data/test/lib/nano/time/test_elapse.rb +0 -27
  1775. data/test/lib/nano/time/test_stamp.rb +0 -31
  1776. data/test/lib/nano/time/test_to_date.rb +0 -31
  1777. data/test/lib/nano/time/test_to_s.rb +0 -31
  1778. data/test/lib/nano/time/test_to_time.rb +0 -31
  1779. data/test/lib/unit/test_methodprobe.rb +0 -53
  1780. data/test/tc_nil_as_emptiness.rb +0 -20
  1781. data/web/favicon.ico +0 -0
  1782. data/web/images/abc.png +0 -0
  1783. data/web/images/abc1.png +0 -0
  1784. data/web/images/gray.jpg +0 -0
  1785. data/web/images/ruby-lg.png +0 -0
  1786. data/web/images/ruby.gif +0 -0
  1787. data/web/index.html +0 -310
@@ -0,0 +1,327 @@
1
+ #--
2
+ # Time In English
3
+ #
4
+ # Copyright (c) 2005 Thomas Sawyer
5
+ # Copyright (c) 2004 Rich Kilmer
6
+ #
7
+ # Ruby License
8
+ #
9
+ # This module is free software. You may use, modify, and/or redistribute this
10
+ # software under the same terms as Ruby.
11
+ #
12
+ # This program is distributed in the hope that it will be useful, but WITHOUT
13
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ # FITNESS FOR A PARTICULAR PURPOSE.
15
+ #
16
+ # ===========================================================================
17
+ # REVISION HISTORY
18
+ # ===========================================================================
19
+ # * 2005.04.28 trans Ported from Rich Kilmer's lib.
20
+ # ===========================================================================
21
+ #
22
+ # :TODO: Extra methods
23
+ # Add in_* methods, like in_days, in_hours, etc.
24
+ #
25
+ # :CREDIT:
26
+ # Credit goes to Richard Kilmer for the orignal work and
27
+ # Alexander Kellett for suggesting them for Nano (then Facets).
28
+ #
29
+ #++
30
+
31
+ require 'facet/time/change'
32
+
33
+ #:title: Time In English
34
+ #
35
+ # Plain-English convenience methods for dealing with dates and times.
36
+ #
37
+
38
+ class Numeric
39
+
40
+ # Enables the use of time calculations and declarations,
41
+ # like 45.minutes + 2.hours + 4.years. The base unit for
42
+ # all of these Numeric time methods is seconds.
43
+ def seconds ; self ; end
44
+ alias_method :second, :seconds
45
+ #def as_seconds ; self ; end
46
+
47
+ # Converts minutes into seconds.
48
+ def minutes ; self * 60 ; end
49
+ alias_method :minute, :minutes
50
+ #def as_minutes ; self.to_f / 60 ; end
51
+
52
+ # Converts hours into seconds.
53
+ def hours ; self * 60.minutes ; end
54
+ alias_method :hour, :hours
55
+ #def as_hours ; self / 60.minutes ; end
56
+
57
+ # Converts days into seconds.
58
+ def days ; self * 24.hours ; end
59
+ alias_method :day, :days
60
+ #def as_days ; self / 24.hours ; end
61
+
62
+ # Converts weeks into seconds.
63
+ def weeks ; self * 7.days ; end
64
+ alias_method :week, :weeks
65
+ #def as_weeks ; self / 7.days ; end
66
+
67
+ # Converts fortnights into seconds.
68
+ # (A fortnight is 2 weeks)
69
+ def fortnights ; self * 2.weeks ; end
70
+ alias_method :fortnight, :fortnights
71
+ #def as_fortnights ; self / 2.weeks ; end
72
+
73
+ # Converts months into seconds.
74
+ # WARNING: This is not exact as it assumes 30 days to a month.
75
+ def months ; self * 30.days ; end
76
+ alias_method :month, :months
77
+ #def as_months ; self / 30.days ; end
78
+
79
+ # Converts years into seconds.
80
+ def years ; self * 365.days ; end
81
+ alias_method :year, :years
82
+ #def as_years ; self / 365.days ; end
83
+
84
+ # Calculates time _before_ a given time. Default time is now.
85
+ # Reads best with arguments: 10.days.before( Time.now - 1.day )
86
+ def before(time = ::Time.now)
87
+ time - self
88
+ end
89
+ alias_method :until, :before # Reads best with argument: 10.minutes.until(time)
90
+ alias_method :ago, :before # Reads best without arguments: 10.minutes.ago
91
+
92
+ # Calculates time _after_ a given time. Default time is now.
93
+ # Reads best with argument: 10.minutes.after(time)
94
+ def after(time = ::Time.now)
95
+ time + self
96
+ end
97
+ alias_method :since, :after # Reads best with argument: 10.minutes.since(time)
98
+ alias_method :from_now, :after # Reads best without arguments: 10.minutes.from_now
99
+ alias_method :later, :after # Reads best without arguments: 10.minutes.later
100
+
101
+ end
102
+
103
+ class Time
104
+
105
+ NEVER = Time.mktime(2038)
106
+ ZERO = Time.mktime(1972)
107
+
108
+ # Seconds since midnight: Time.now.seconds_since_midnight
109
+ def seconds_since_midnight
110
+ self.hour.hours + self.min.minutes + self.sec + (self.usec/1.0e+6)
111
+ end
112
+
113
+ # Returns a new Time representing the time a number of seconds ago.
114
+ # Do not use this method in combination with x.months, use months_ago instead!
115
+ def ago(seconds)
116
+ # This is basically a wrapper around the Numeric extension.
117
+ #seconds.until(self)
118
+ self - seconds
119
+ end
120
+
121
+ # Returns a new Time representing the time a number of seconds
122
+ # since the instance time. Do not use this method in combination
123
+ # with x.months, use months_since instead!
124
+ def since(seconds)
125
+ # This is basically a wrapper around the Numeric extension.
126
+ #seconds.since(self)
127
+ self + seconds
128
+ end
129
+ alias_method :in, :since
130
+
131
+ # Returns a new Time representing the time a number of specified
132
+ # months ago.
133
+ def months_ago(months)
134
+ if months >= self.month
135
+ change(:year => self.year - 1, :month => 12).months_ago(months - self.month)
136
+ else
137
+ change(:year => self.year, :month => self.month - months)
138
+ end
139
+ end
140
+
141
+ def months_since(months)
142
+ if months + self.month > 12
143
+ change(:year => self.year + 1, :month => 1).months_since(months - (self.month == 1 ? 12 : (self.month + 1)))
144
+ else
145
+ change(:year => self.year, :month => self.month + months)
146
+ end
147
+ end
148
+
149
+ # Returns a new Time representing the time a number of specified
150
+ # years ago.
151
+ def years_ago(years)
152
+ change(:year => self.year - years)
153
+ end
154
+
155
+ def years_since(years)
156
+ change(:year => self.year + years)
157
+ end
158
+
159
+ # Short-hand for months_ago(1)
160
+ def last_year
161
+ years_since(1)
162
+ end
163
+
164
+ # Short-hand for months_since(1)
165
+ def next_year
166
+ years_since(1)
167
+ end
168
+
169
+ # Short-hand for months_ago(1)
170
+ def last_month
171
+ months_ago(1)
172
+ end
173
+
174
+ # Short-hand for months_since(1)
175
+ def next_month
176
+ months_since(1)
177
+ end
178
+
179
+ # Returns a new Time representing the "start" of this week (Monday, 0:00)
180
+ def beginning_of_week
181
+ (self - self.wday.days).midnight + 1.day
182
+ end
183
+ alias :monday :beginning_of_week
184
+ alias :at_beginning_of_week :beginning_of_week
185
+
186
+ # Returns a new Time representing the start of the given
187
+ # day in next week (default is Monday).
188
+ def next_week(day = :monday)
189
+ days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2,
190
+ :thursday => 3, :friday => 4, :saturday => 5,
191
+ :sunday => 6 }
192
+ since(1.week).beginning_of_week.since(days_into_week[day].day).change(:hour => 0)
193
+ end
194
+
195
+ # Set time to end of day
196
+ #def end_of_day
197
+ # return Time.mktime(year, month, day, 23, 59, 59, 999)
198
+ #end
199
+
200
+ # Returns a new Time representing the start of the day (0:00)
201
+ def beginning_of_day
202
+ self - self.seconds_since_midnight
203
+ end
204
+ alias :midnight :beginning_of_day
205
+ alias :at_midnight :beginning_of_day
206
+ alias :at_beginning_of_day :beginning_of_day
207
+ alias :start_of_day :beginning_of_day
208
+
209
+ # Returns a new Time representing the start of the month
210
+ # (1st of the month, 0:00)
211
+ def beginning_of_month
212
+ #self - ((self.mday-1).days + self.seconds_since_midnight)
213
+ change(:mday => 1,:hour => 0, :min => 0, :sec => 0, :usec => 0)
214
+ end
215
+ alias_method :at_beginning_of_month, :beginning_of_month
216
+
217
+ # Returns a new Time representing the start of the year (1st of january, 0:00)
218
+ def beginning_of_year
219
+ change(:month => 1,:mday => 1,:hour => 0, :min => 0, :sec => 0, :usec => 0)
220
+ end
221
+ alias :at_beginning_of_year :beginning_of_year
222
+
223
+ # Convenience method which returns a new Time representing
224
+ # the time 1 day ago
225
+ def yesterday
226
+ self.ago(1.day)
227
+ end
228
+
229
+ # Convenience method which returns a new Time representing
230
+ # the time 1 day since the instance time
231
+ def tomorrow
232
+ self.since(1.day)
233
+ end
234
+
235
+ # Returns a new time at start of day
236
+ def to_start_of_day
237
+ return Time.mktime(year, month, day, 0, 0, 0, 0)
238
+ end
239
+
240
+ # Rrturns a new time at end of day
241
+ def to_end_of_day
242
+ return Time.mktime(year, month, day, 23, 59, 59, 999)
243
+ end
244
+
245
+ # Returns true only if day of time is included in the
246
+ # range (stime..etime). Only year days are checked.
247
+ def in_day_range?(stime=ZERO, etime=NEVER)
248
+ if (etime <= stime)
249
+ warn "invalid end time (#{etime} < #{stime})" if $DEBUG
250
+ etime = NEVER
251
+ end
252
+
253
+ stime = stime.to_start_of_day
254
+ etime = etime.to_end_of_day
255
+
256
+ return (stime..etime).include?(time)
257
+ end
258
+ end
259
+
260
+
261
+ # _____ _
262
+ # |_ _|__ ___| |_
263
+ # | |/ _ \/ __| __|
264
+ # | | __/\__ \ |_
265
+ # |_|\___||___/\__|
266
+ #
267
+
268
+ =begin testing
269
+
270
+ require 'test/unit'
271
+ #require 'mega/multiplier'
272
+
273
+ class TC_Numeric < Test::Unit::TestCase
274
+
275
+ #def test_micro_seconds
276
+ # assert_equal( 0.000001, 1.microsecond )
277
+ #end
278
+
279
+ #def test_milli_seconds
280
+ # assert_equal( 0.001, 1.millisecond )
281
+ #end
282
+
283
+ def test_seconds
284
+ assert_equal( 60**0, 1.seconds )
285
+ end
286
+
287
+ def test_minutes
288
+ assert_equal( 60**1, 1.minutes )
289
+ end
290
+
291
+ def test_hours
292
+ assert_equal( 60**2, 1.hours )
293
+ end
294
+
295
+ def test_days
296
+ assert_equal( 24*(60**2), 1.days )
297
+ end
298
+
299
+ def test_weeks
300
+ assert_equal( 7*24*(60**2), 1.weeks )
301
+ end
302
+
303
+ def test_fortnights
304
+ assert_equal( 14*24*(60**2), 1.fortnights )
305
+ end
306
+
307
+ def test_months
308
+ assert_equal( 30*24*(60**2), 1.months )
309
+ end
310
+
311
+ def test_years
312
+ assert_equal( 365*24*(60**2), 1.years )
313
+ end
314
+
315
+ def test_before
316
+ t = Time.now
317
+ assert_equal( t - 1.day, 1.day.before(t) )
318
+ end
319
+
320
+ def test_after
321
+ t = Time.now
322
+ assert_equal( t + 1.day, 1.day.after(t) )
323
+ end
324
+
325
+ end
326
+
327
+ =end
@@ -0,0 +1,71 @@
1
+ #--
2
+ # Inflect
3
+ #
4
+ # Copyright (c) 2005 Thomas Sawyer
5
+ #
6
+ # Ruby License
7
+ #
8
+ # This module is free software. You may use, modify, and/or redistribute this
9
+ # software under the same terms as Ruby.
10
+ #
11
+ # This program is distributed in the hope that it will be useful, but WITHOUT
12
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
+ # FOR A PARTICULAR PURPOSE.
14
+ #
15
+ #================================================================================
16
+ # Revision History
17
+ #================================================================================
18
+ # 2005-10-25 trans
19
+ # Brought over to Calibre from Facets after "SOC Revelation".
20
+ #================================================================================
21
+ #++
22
+
23
+ #:title: Inflect
24
+ #
25
+ # Collection of Facets that apply to inflecting a String or Symbol.
26
+ #
27
+ # "dog".plural #=> "dogs"
28
+ # "dog_tail".camelcase #=> "DogTail"
29
+ # "1".ordinal #=> "1st"
30
+ #
31
+ # :going.upcase #=> :GOING
32
+ # :Arrow.capitlized? #=> true
33
+ #
34
+ # = Author(s)
35
+ #
36
+ # * Thomas Sawyer
37
+ # * (see Facets for corollary)
38
+ #
39
+
40
+ require 'facet/string/singular'
41
+ require 'facet/string/plural'
42
+
43
+ require 'facet/string/camelcase'
44
+ require 'facet/string/camelize'
45
+
46
+ require 'facet/string/underscore'
47
+ require 'facet/string/humanize'
48
+
49
+ require 'facet/string/basename'
50
+ require 'facet/string/demodulize'
51
+
52
+ require 'facet/string/upcase'
53
+ require 'facet/string/downcase'
54
+ require 'facet/string/capitalized'
55
+
56
+ require 'facet/string/ordinal'
57
+
58
+ # don't exist, should they?
59
+ #require 'facet/symbol/singular'
60
+ #require 'facet/symbol/plural'
61
+
62
+ require 'facet/symbol/camelcase'
63
+ require 'facet/symbol/camelize'
64
+
65
+ require 'facet/symbol/underscore'
66
+
67
+ require 'facet/symbol/upcase'
68
+ require 'facet/symbol/downcase'
69
+ require 'facet/symbol/capitalize'
70
+ require 'facet/symbol/capitalized'
71
+
@@ -0,0 +1,34 @@
1
+
2
+ # :title: NilClass as Emptiness/Nothingness
3
+ #
4
+ # The ideas here is to have nil act more like
5
+ # an empty set than an error catcher.
6
+ # So you get responses like
7
+ #
8
+ # nil.include?(:x) # => nil
9
+ #
10
+ # instead of an error being raised.
11
+ #
12
+ # WARNING! One should be aware that in some rare cases
13
+ # incompatabilites may arise when using these methods in
14
+ # conjuction with other libraries.
15
+
16
+ require 'nilclass/to_f'
17
+ require 'nilclass/to_h'
18
+ require 'nilclass/op_fetch'
19
+ require 'nilclass/include'
20
+ require 'nilclass/empty'
21
+ require 'nilclass/size'
22
+ #require 'nano/nilclass/length'
23
+
24
+ # Effectively, the following is what happens:
25
+ #
26
+ # class NilClass
27
+ # def to_f; 0.0; end
28
+ # def to_h; {}; end
29
+ # def size; 0; end
30
+ # def length; 0; end
31
+ # def empty?; true; end
32
+ # def [](*args); nil; end
33
+ # def include?(*args); nil; end
34
+ # end
@@ -0,0 +1,21 @@
1
+
2
+ # :title: Randomization Methods
3
+ #
4
+ # All the facets related to _randomness_.
5
+ #
6
+
7
+ require 'facet/array/at_rand'
8
+ require 'facet/array/rand_indexes'
9
+ require 'facet/array/rand_subset'
10
+ require 'facet/array/shuffle'
11
+
12
+ require 'facet/hash/rand_value'
13
+ require 'facet/hash/rand_key'
14
+ require 'facet/hash/rand_pair'
15
+ require 'facet/hash/shuffle'
16
+
17
+ require 'facet/string/at_rand'
18
+ require 'facet/string/rand_byte'
19
+ require 'facet/string/shuffle'
20
+
21
+ require 'facet/kernel/maybe'