mack-facets 0.7.0.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/doc/classes/Array.html +60 -60
  2. data/doc/classes/Class.html +18 -18
  3. data/doc/classes/Hash.html +18 -18
  4. data/doc/classes/Kernel.html +40 -12
  5. data/doc/classes/Mack/Facets/DateTime.html +168 -0
  6. data/doc/classes/Mack/Facets.html +111 -0
  7. data/doc/classes/Mack/Utils/BlankSlate.html +113 -0
  8. data/doc/classes/Mack/Utils/Inflector.html +47 -47
  9. data/doc/classes/Mack/Utils/RegistryList.html +74 -74
  10. data/doc/classes/Mack/Utils/RegistryMap.html +71 -71
  11. data/doc/classes/Math.html +18 -18
  12. data/doc/classes/Module.html +12 -12
  13. data/doc/classes/NilClass.html +6 -6
  14. data/doc/classes/Object.html +68 -68
  15. data/doc/classes/String.html +185 -172
  16. data/doc/classes/Symbol.html +6 -6
  17. data/doc/classes/Time.html +204 -0
  18. data/doc/created.rid +1 -1
  19. data/doc/files/README.html +1 -1
  20. data/doc/files/lib/mack-facets/english_extensions/inflect_rb.html +1 -1
  21. data/doc/files/lib/mack-facets/english_extensions/numerals_rb.html +1 -1
  22. data/doc/files/lib/mack-facets/extensions/array_rb.html +1 -1
  23. data/doc/files/lib/mack-facets/extensions/class_rb.html +1 -1
  24. data/doc/files/lib/mack-facets/extensions/date_time_rb.html +129 -0
  25. data/doc/files/lib/mack-facets/extensions/hash_rb.html +1 -1
  26. data/doc/files/lib/mack-facets/extensions/kernel_rb.html +1 -1
  27. data/doc/files/lib/mack-facets/extensions/math_rb.html +1 -1
  28. data/doc/files/lib/mack-facets/extensions/module_rb.html +1 -1
  29. data/doc/files/lib/mack-facets/extensions/nil_class_rb.html +1 -1
  30. data/doc/files/lib/mack-facets/extensions/object_rb.html +1 -1
  31. data/doc/files/lib/mack-facets/extensions/string_rb.html +1 -1
  32. data/doc/files/lib/mack-facets/extensions/symbol_rb.html +1 -1
  33. data/doc/files/lib/mack-facets/extensions/time_rb.html +108 -0
  34. data/doc/files/lib/mack-facets/utils/blank_slate_rb.html +101 -0
  35. data/doc/files/lib/mack-facets/utils/inflections_rb.html +1 -1
  36. data/doc/files/lib/mack-facets/utils/inflector_rb.html +1 -1
  37. data/doc/files/lib/mack-facets/utils/options_merger_rb.html +1 -1
  38. data/doc/files/lib/mack-facets/utils/registry_list_rb.html +1 -1
  39. data/doc/files/lib/mack-facets/utils/registry_map_rb.html +1 -1
  40. data/doc/files/lib/mack-facets_rb.html +3 -3
  41. data/doc/fr_class_index.html +2 -0
  42. data/doc/fr_file_index.html +1 -0
  43. data/doc/fr_method_index.html +75 -71
  44. data/lib/mack-facets/extensions/date_time.rb +36 -0
  45. data/lib/mack-facets/extensions/kernel.rb +5 -0
  46. data/lib/mack-facets/extensions/string.rb +2 -0
  47. data/lib/mack-facets/extensions/time.rb +5 -0
  48. data/lib/mack-facets.rb +3 -4
  49. metadata +12 -4
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: blank_slate.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>blank_slate.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/mack-facets/utils/blank_slate.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Aug 25 10:11:29 -0400 2008</td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Aug 25 10:11:29 -0400 2008</td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Aug 25 10:11:29 -0400 2008</td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Aug 25 10:11:29 -0400 2008</td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Aug 25 10:11:29 -0400 2008</td>
59
+ <td>Mon Sep 08 10:32:47 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Fri Aug 29 11:33:22 -0400 2008</td>
59
+ <td>Mon Sep 08 10:33:04 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -76,7 +76,7 @@
76
76
  rubygems&nbsp;&nbsp;
77
77
  digest&nbsp;&nbsp;
78
78
  facets&nbsp;&nbsp;
79
- facets/style&nbsp;&nbsp;
79
+ facets/string&nbsp;&nbsp;
80
80
  facets/blank&nbsp;&nbsp;
81
81
  facets/hash&nbsp;&nbsp;
82
82
  facets/hash/symbolize_keys&nbsp;&nbsp;
@@ -85,7 +85,7 @@
85
85
  facets/infinity&nbsp;&nbsp;
86
86
  facets/times&nbsp;&nbsp;
87
87
  facets/time&nbsp;&nbsp;
88
- facets/string&nbsp;&nbsp;
88
+ facets/string/style&nbsp;&nbsp;
89
89
  english/inflect&nbsp;&nbsp;
90
90
  english/numerals&nbsp;&nbsp;
91
91
  extlib/assertions&nbsp;&nbsp;
@@ -24,6 +24,8 @@
24
24
  <a href="classes/Class.html">Class</a><br />
25
25
  <a href="classes/Hash.html">Hash</a><br />
26
26
  <a href="classes/Kernel.html">Kernel</a><br />
27
+ <a href="classes/Mack/Facets.html">Mack::Facets</a><br />
28
+ <a href="classes/Mack/Facets/DateTime.html">Mack::Facets::DateTime</a><br />
27
29
  <a href="classes/Mack/Utils/BlankSlate.html">Mack::Utils::BlankSlate</a><br />
28
30
  <a href="classes/Mack/Utils/Inflector.html">Mack::Utils::Inflector</a><br />
29
31
  <a href="classes/Mack/Utils/RegistryList.html">Mack::Utils::RegistryList</a><br />
@@ -26,6 +26,7 @@
26
26
  <a href="files/lib/mack-facets/english_extensions/numerals_rb.html">lib/mack-facets/english_extensions/numerals.rb</a><br />
27
27
  <a href="files/lib/mack-facets/extensions/array_rb.html">lib/mack-facets/extensions/array.rb</a><br />
28
28
  <a href="files/lib/mack-facets/extensions/class_rb.html">lib/mack-facets/extensions/class.rb</a><br />
29
+ <a href="files/lib/mack-facets/extensions/date_time_rb.html">lib/mack-facets/extensions/date_time.rb</a><br />
29
30
  <a href="files/lib/mack-facets/extensions/hash_rb.html">lib/mack-facets/extensions/hash.rb</a><br />
30
31
  <a href="files/lib/mack-facets/extensions/kernel_rb.html">lib/mack-facets/extensions/kernel.rb</a><br />
31
32
  <a href="files/lib/mack-facets/extensions/math_rb.html">lib/mack-facets/extensions/math.rb</a><br />
@@ -20,80 +20,84 @@
20
20
  <div id="index">
21
21
  <h1 class="section-bar">Methods</h1>
22
22
  <div id="index-entries">
23
- <a href="classes/Hash.html#M000005">- (Hash)</a><br />
24
- <a href="classes/Mack/Utils/RegistryList.html#M000066">add (Mack::Utils::RegistryList)</a><br />
25
- <a href="classes/Mack/Utils/RegistryList.html#M000061">add (Mack::Utils::RegistryList)</a><br />
26
- <a href="classes/Mack/Utils/RegistryMap.html#M000055">add (Mack::Utils::RegistryMap)</a><br />
23
+ <a href="classes/Hash.html#M000031">- (Hash)</a><br />
27
24
  <a href="classes/Mack/Utils/RegistryMap.html#M000050">add (Mack::Utils::RegistryMap)</a><br />
28
- <a href="classes/Class.html#M000019">class_is_a? (Class)</a><br />
29
- <a href="classes/Object.html#M000025">class_parents (Object)</a><br />
30
- <a href="classes/Mack/Utils/RegistryMap.html#M000053">clear! (Mack::Utils::RegistryMap)</a><br />
31
- <a href="classes/Mack/Utils/RegistryList.html#M000064">clear! (Mack::Utils::RegistryList)</a><br />
32
- <a href="classes/String.html#M000034">constantize (String)</a><br />
33
- <a href="classes/Module.html#M000016">convert_security_of_methods (Module)</a><br />
34
- <a href="classes/Array.html#M000014">count (Array)</a><br />
35
- <a href="classes/String.html#M000035">hexdigest (String)</a><br />
36
- <a href="classes/String.html#M000036">hexdigest! (String)</a><br />
37
- <a href="classes/Module.html#M000017">include_safely_into (Module)</a><br />
38
- <a href="classes/Mack/Utils/Inflector.html#M000047">inflections (Mack::Utils::Inflector)</a><br />
39
- <a href="classes/Mack/Utils/RegistryMap.html#M000048">initial_state (Mack::Utils::RegistryMap)</a><br />
40
- <a href="classes/Mack/Utils/RegistryList.html#M000059">initial_state (Mack::Utils::RegistryList)</a><br />
41
- <a href="classes/Array.html#M000015">invert (Array)</a><br />
42
- <a href="classes/Mack/Utils/Inflector.html#M000044">irregular (Mack::Utils::Inflector)</a><br />
43
- <a href="classes/Object.html#M000030">ivar_cache (Object)</a><br />
44
- <a href="classes/Object.html#M000031">ivar_cache_clear (Object)</a><br />
45
- <a href="classes/Hash.html#M000004">join (Hash)</a><br />
46
- <a href="classes/Math.html#M000072">log2 (Math)</a><br />
47
- <a href="classes/Math.html#M000074">max (Math)</a><br />
48
- <a href="classes/String.html#M000033">methodize (String)</a><br />
49
- <a href="classes/Symbol.html#M000003">methodize (Symbol)</a><br />
50
- <a href="classes/Math.html#M000073">min (Math)</a><br />
51
- <a href="classes/Mack/Utils/RegistryList.html#M000069">move_to_bottom (Mack::Utils::RegistryList)</a><br />
52
- <a href="classes/Mack/Utils/RegistryMap.html#M000058">move_to_bottom (Mack::Utils::RegistryMap)</a><br />
53
- <a href="classes/Mack/Utils/RegistryList.html#M000068">move_to_top (Mack::Utils::RegistryList)</a><br />
54
- <a href="classes/Mack/Utils/RegistryMap.html#M000057">move_to_top (Mack::Utils::RegistryMap)</a><br />
55
- <a href="classes/Object.html#M000032">namespaces (Object)</a><br />
56
- <a href="classes/Object.html#M000027">needs_method (Object)</a><br />
57
- <a href="classes/Class.html#M000018">new_instance_of (Class)</a><br />
58
- <a href="classes/Class.html#M000020">parents (Class)</a><br />
59
- <a href="classes/Array.html#M000007">parse_splat_args (Array)</a><br />
60
- <a href="classes/Array.html#M000010">pick_random (Array)</a><br />
61
- <a href="classes/Mack/Utils/Inflector.html#M000042">plural (Mack::Utils::Inflector)</a><br />
62
- <a href="classes/Mack/Utils/Inflector.html#M000046">pluralize (Mack::Utils::Inflector)</a><br />
63
- <a href="classes/Kernel.html#M000070">pp_to_s (Kernel)</a><br />
64
- <a href="classes/Object.html#M000023">print_methods (Object)</a><br />
65
- <a href="classes/Array.html#M000011">random_each (Array)</a><br />
66
- <a href="classes/String.html#M000037">randomize (String)</a><br />
67
- <a href="classes/Array.html#M000008">randomize (Array)</a><br />
68
- <a href="classes/Array.html#M000009">randomize! (Array)</a><br />
69
- <a href="classes/Mack/Utils/RegistryMap.html#M000052">registered_items (Mack::Utils::RegistryMap)</a><br />
70
- <a href="classes/Mack/Utils/RegistryList.html#M000063">registered_items (Mack::Utils::RegistryList)</a><br />
71
- <a href="classes/Mack/Utils/RegistryList.html#M000067">remove (Mack::Utils::RegistryList)</a><br />
72
- <a href="classes/Mack/Utils/RegistryList.html#M000062">remove (Mack::Utils::RegistryList)</a><br />
25
+ <a href="classes/Mack/Utils/RegistryList.html#M000067">add (Mack::Utils::RegistryList)</a><br />
26
+ <a href="classes/Mack/Utils/RegistryMap.html#M000045">add (Mack::Utils::RegistryMap)</a><br />
27
+ <a href="classes/Mack/Utils/RegistryList.html#M000062">add (Mack::Utils::RegistryList)</a><br />
28
+ <a href="classes/Mack/Facets/DateTime.html#M000071">add_seconds (Mack::Facets::DateTime)</a><br />
29
+ <a href="classes/Class.html#M000028">class_is_a? (Class)</a><br />
30
+ <a href="classes/Object.html#M000004">class_parents (Object)</a><br />
31
+ <a href="classes/Mack/Utils/RegistryList.html#M000065">clear! (Mack::Utils::RegistryList)</a><br />
32
+ <a href="classes/Mack/Utils/RegistryMap.html#M000048">clear! (Mack::Utils::RegistryMap)</a><br />
33
+ <a href="classes/String.html#M000035">constantize (String)</a><br />
34
+ <a href="classes/Module.html#M000012">convert_security_of_methods (Module)</a><br />
35
+ <a href="classes/Array.html#M000021">count (Array)</a><br />
36
+ <a href="classes/String.html#M000036">hexdigest (String)</a><br />
37
+ <a href="classes/String.html#M000037">hexdigest! (String)</a><br />
38
+ <a href="classes/Module.html#M000013">include_safely_into (Module)</a><br />
39
+ <a href="classes/Mack/Utils/Inflector.html#M000059">inflections (Mack::Utils::Inflector)</a><br />
40
+ <a href="classes/Mack/Utils/RegistryList.html#M000060">initial_state (Mack::Utils::RegistryList)</a><br />
41
+ <a href="classes/Mack/Utils/RegistryMap.html#M000043">initial_state (Mack::Utils::RegistryMap)</a><br />
42
+ <a href="classes/Array.html#M000022">invert (Array)</a><br />
43
+ <a href="classes/Mack/Utils/Inflector.html#M000056">irregular (Mack::Utils::Inflector)</a><br />
44
+ <a href="classes/Object.html#M000009">ivar_cache (Object)</a><br />
45
+ <a href="classes/Object.html#M000010">ivar_cache_clear (Object)</a><br />
46
+ <a href="classes/Hash.html#M000030">join (Hash)</a><br />
47
+ <a href="classes/Math.html#M000076">log2 (Math)</a><br />
48
+ <a href="classes/Math.html#M000078">max (Math)</a><br />
49
+ <a href="classes/String.html#M000034">methodize (String)</a><br />
50
+ <a href="classes/Symbol.html#M000026">methodize (Symbol)</a><br />
51
+ <a href="classes/Math.html#M000077">min (Math)</a><br />
52
+ <a href="classes/Mack/Facets/DateTime.html#M000072">minus_seconds (Mack::Facets::DateTime)</a><br />
53
+ <a href="classes/Mack/Utils/RegistryList.html#M000070">move_to_bottom (Mack::Utils::RegistryList)</a><br />
54
+ <a href="classes/Mack/Utils/RegistryMap.html#M000053">move_to_bottom (Mack::Utils::RegistryMap)</a><br />
55
+ <a href="classes/Mack/Utils/RegistryMap.html#M000052">move_to_top (Mack::Utils::RegistryMap)</a><br />
56
+ <a href="classes/Mack/Utils/RegistryList.html#M000069">move_to_top (Mack::Utils::RegistryList)</a><br />
57
+ <a href="classes/Object.html#M000011">namespaces (Object)</a><br />
58
+ <a href="classes/Object.html#M000006">needs_method (Object)</a><br />
59
+ <a href="classes/Class.html#M000027">new_instance_of (Class)</a><br />
60
+ <a href="classes/Class.html#M000029">parents (Class)</a><br />
61
+ <a href="classes/Array.html#M000014">parse_splat_args (Array)</a><br />
62
+ <a href="classes/Array.html#M000017">pick_random (Array)</a><br />
63
+ <a href="classes/Mack/Utils/Inflector.html#M000054">plural (Mack::Utils::Inflector)</a><br />
64
+ <a href="classes/Mack/Utils/Inflector.html#M000058">pluralize (Mack::Utils::Inflector)</a><br />
65
+ <a href="classes/Kernel.html#M000073">pp_to_s (Kernel)</a><br />
66
+ <a href="classes/Object.html#M000002">print_methods (Object)</a><br />
67
+ <a href="classes/Time.html#M000025">random (Time)</a><br />
68
+ <a href="classes/Array.html#M000018">random_each (Array)</a><br />
69
+ <a href="classes/String.html#M000038">randomize (String)</a><br />
70
+ <a href="classes/Array.html#M000015">randomize (Array)</a><br />
71
+ <a href="classes/Array.html#M000016">randomize! (Array)</a><br />
72
+ <a href="classes/Mack/Utils/RegistryList.html#M000064">registered_items (Mack::Utils::RegistryList)</a><br />
73
+ <a href="classes/Mack/Utils/RegistryMap.html#M000047">registered_items (Mack::Utils::RegistryMap)</a><br />
73
74
  <a href="classes/Mack/Utils/RegistryMap.html#M000051">remove (Mack::Utils::RegistryMap)</a><br />
74
- <a href="classes/Mack/Utils/RegistryMap.html#M000056">remove (Mack::Utils::RegistryMap)</a><br />
75
+ <a href="classes/Mack/Utils/RegistryList.html#M000063">remove (Mack::Utils::RegistryList)</a><br />
76
+ <a href="classes/Mack/Utils/RegistryList.html#M000068">remove (Mack::Utils::RegistryList)</a><br />
77
+ <a href="classes/Mack/Utils/RegistryMap.html#M000046">remove (Mack::Utils::RegistryMap)</a><br />
78
+ <a href="classes/Mack/Utils/RegistryMap.html#M000044">reset! (Mack::Utils::RegistryMap)</a><br />
75
79
  <a href="classes/Mack/Utils/RegistryMap.html#M000049">reset! (Mack::Utils::RegistryMap)</a><br />
76
- <a href="classes/Mack/Utils/RegistryMap.html#M000054">reset! (Mack::Utils::RegistryMap)</a><br />
77
- <a href="classes/Mack/Utils/RegistryList.html#M000060">reset! (Mack::Utils::RegistryList)</a><br />
78
- <a href="classes/Mack/Utils/RegistryList.html#M000065">reset! (Mack::Utils::RegistryList)</a><br />
79
- <a href="classes/Kernel.html#M000071">retryable (Kernel)</a><br />
80
- <a href="classes/Object.html#M000028">running_time (Object)</a><br />
81
- <a href="classes/Object.html#M000022">safely_include_module (Object)</a><br />
82
- <a href="classes/Object.html#M000029">send_with_chain (Object)</a><br />
83
- <a href="classes/Mack/Utils/Inflector.html#M000043">singular (Mack::Utils::Inflector)</a><br />
84
- <a href="classes/Mack/Utils/Inflector.html#M000045">singularize (Mack::Utils::Inflector)</a><br />
85
- <a href="classes/Array.html#M000012">subset? (Array)</a><br />
86
- <a href="classes/Array.html#M000013">superset? (Array)</a><br />
87
- <a href="classes/Time.html#M000001">to_date (Time)</a><br />
88
- <a href="classes/Time.html#M000002">to_datetime (Time)</a><br />
89
- <a href="classes/Object.html#M000026">to_param (Object)</a><br />
90
- <a href="classes/NilClass.html#M000021">to_param (NilClass)</a><br />
91
- <a href="classes/Hash.html#M000006">to_params (Hash)</a><br />
92
- <a href="classes/String.html#M000040">truncate (String)</a><br />
93
- <a href="classes/String.html#M000041">truncate! (String)</a><br />
94
- <a href="classes/String.html#M000038">uri_escape (String)</a><br />
95
- <a href="classes/String.html#M000039">uri_unescape (String)</a><br />
96
- <a href="classes/Object.html#M000024">with_options (Object)</a><br />
80
+ <a href="classes/Mack/Utils/RegistryList.html#M000061">reset! (Mack::Utils::RegistryList)</a><br />
81
+ <a href="classes/Mack/Utils/RegistryList.html#M000066">reset! (Mack::Utils::RegistryList)</a><br />
82
+ <a href="classes/Kernel.html#M000074">retryable (Kernel)</a><br />
83
+ <a href="classes/Kernel.html#M000075">ruby? (Kernel)</a><br />
84
+ <a href="classes/Object.html#M000007">running_time (Object)</a><br />
85
+ <a href="classes/Object.html#M000001">safely_include_module (Object)</a><br />
86
+ <a href="classes/Object.html#M000008">send_with_chain (Object)</a><br />
87
+ <a href="classes/Mack/Utils/Inflector.html#M000055">singular (Mack::Utils::Inflector)</a><br />
88
+ <a href="classes/Mack/Utils/Inflector.html#M000057">singularize (Mack::Utils::Inflector)</a><br />
89
+ <a href="classes/Array.html#M000019">subset? (Array)</a><br />
90
+ <a href="classes/Array.html#M000020">superset? (Array)</a><br />
91
+ <a href="classes/Time.html#M000023">to_date (Time)</a><br />
92
+ <a href="classes/Time.html#M000024">to_datetime (Time)</a><br />
93
+ <a href="classes/NilClass.html#M000033">to_param (NilClass)</a><br />
94
+ <a href="classes/Object.html#M000005">to_param (Object)</a><br />
95
+ <a href="classes/Hash.html#M000032">to_params (Hash)</a><br />
96
+ <a href="classes/String.html#M000041">truncate (String)</a><br />
97
+ <a href="classes/String.html#M000042">truncate! (String)</a><br />
98
+ <a href="classes/String.html#M000039">uri_escape (String)</a><br />
99
+ <a href="classes/String.html#M000040">uri_unescape (String)</a><br />
100
+ <a href="classes/Object.html#M000003">with_options (Object)</a><br />
97
101
  </div>
98
102
  </div>
99
103
  </body>
@@ -0,0 +1,36 @@
1
+ # class DateTime
2
+ #
3
+ # # Adds seconds and returns a new DateTime object
4
+ # def add_seconds(secs)
5
+ # self + (secs.to_f / 1.day)
6
+ # end
7
+ #
8
+ # # Subtracts seconds and returns a new DateTime object
9
+ # def minus_seconds(secs)
10
+ # self - (secs.to_f / 1.day)
11
+ # end
12
+ #
13
+ # end
14
+ require 'date'
15
+ require 'time'
16
+ DateTime.instance_eval do
17
+ # Adds seconds and returns a new DateTime object
18
+
19
+ end
20
+
21
+ module Mack
22
+ module Facets
23
+ module DateTime
24
+ def add_seconds(secs)
25
+ self + (secs.to_f / 1.day)
26
+ end
27
+
28
+ # Subtracts seconds and returns a new DateTime object
29
+ def minus_seconds(secs)
30
+ self - (secs.to_f / 1.day)
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ DateTime.send(:include, Mack::Facets::DateTime)
@@ -31,4 +31,9 @@ module Kernel
31
31
  eval(x, &block)
32
32
  end
33
33
 
34
+ # Returns true/false if the current version of Ruby equals the specified version
35
+ def ruby?(v)
36
+ RUBY_VERSION == v
37
+ end
38
+
34
39
  end
@@ -1,6 +1,8 @@
1
1
  class String
2
2
  include Style
3
3
 
4
+ alias_method :underscore, :snakecase
5
+
4
6
  def methodize
5
7
  x = self
6
8
 
@@ -22,4 +22,9 @@ class Time
22
22
  end
23
23
  end
24
24
 
25
+ # Generates a random Time between the start time and the end time.
26
+ def self.random(start_time, end_time = Time.now)
27
+ start_time + (rand(end_time - start_time).to_i)
28
+ end
29
+
25
30
  end
data/lib/mack-facets.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  fl = File.join(File.dirname(__FILE__), "mack-facets")
2
-
3
2
  require 'rubygems'
4
3
  require 'digest'
5
4
  require File.join(fl, "extensions", "time") # we need this here, otherwise facets 2.4.3 breaks!
6
5
  require 'facets'
7
- require 'facets/style'
6
+ require 'facets/string'
8
7
  require 'facets/blank'
9
8
  require 'facets/hash'
10
9
  require 'facets/hash/symbolize_keys'
@@ -13,7 +12,7 @@ require 'facets/module'
13
12
  require 'facets/infinity'
14
13
  require 'facets/times'
15
14
  require 'facets/time'
16
- require 'facets/string'
15
+ require 'facets/string/style'
17
16
  require 'english/inflect'
18
17
  require 'english/numerals'
19
18
  require 'extlib/assertions'
@@ -24,7 +23,7 @@ require 'extlib/hook'
24
23
  require path
25
24
  end
26
25
 
27
- [:array, :class, :hash, :kernel, :math, :module, :object, :string, :symbol, :nil_class].each do |k|
26
+ [:array, :class, :hash, :kernel, :math, :module, :object, :string, :symbol, :nil_class, :date_time].each do |k|
28
27
  path = File.join(fl, "extensions", "#{k}")
29
28
  require path
30
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack-facets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.1
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-29 00:00:00 -04:00
12
+ date: 2008-09-08 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.4.3
23
+ version: 2.4.4
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: english
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - "="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.9.4
43
+ version: 0.9.5
44
44
  version:
45
45
  description: "mack-facets was developed by: markbates"
46
46
  email: mark@mackframework.com
@@ -55,6 +55,7 @@ files:
55
55
  - lib/mack-facets/english_extensions/numerals.rb
56
56
  - lib/mack-facets/extensions/array.rb
57
57
  - lib/mack-facets/extensions/class.rb
58
+ - lib/mack-facets/extensions/date_time.rb
58
59
  - lib/mack-facets/extensions/hash.rb
59
60
  - lib/mack-facets/extensions/kernel.rb
60
61
  - lib/mack-facets/extensions/math.rb
@@ -76,6 +77,9 @@ files:
76
77
  - doc/classes/Class.html
77
78
  - doc/classes/Hash.html
78
79
  - doc/classes/Kernel.html
80
+ - doc/classes/Mack/Facets/DateTime.html
81
+ - doc/classes/Mack/Facets.html
82
+ - doc/classes/Mack/Utils/BlankSlate.html
79
83
  - doc/classes/Mack/Utils/Inflector.html
80
84
  - doc/classes/Mack/Utils/RegistryList.html
81
85
  - doc/classes/Mack/Utils/RegistryMap.html
@@ -85,11 +89,13 @@ files:
85
89
  - doc/classes/Object.html
86
90
  - doc/classes/String.html
87
91
  - doc/classes/Symbol.html
92
+ - doc/classes/Time.html
88
93
  - doc/created.rid
89
94
  - doc/files/lib/mack-facets/english_extensions/inflect_rb.html
90
95
  - doc/files/lib/mack-facets/english_extensions/numerals_rb.html
91
96
  - doc/files/lib/mack-facets/extensions/array_rb.html
92
97
  - doc/files/lib/mack-facets/extensions/class_rb.html
98
+ - doc/files/lib/mack-facets/extensions/date_time_rb.html
93
99
  - doc/files/lib/mack-facets/extensions/hash_rb.html
94
100
  - doc/files/lib/mack-facets/extensions/kernel_rb.html
95
101
  - doc/files/lib/mack-facets/extensions/math_rb.html
@@ -98,6 +104,8 @@ files:
98
104
  - doc/files/lib/mack-facets/extensions/object_rb.html
99
105
  - doc/files/lib/mack-facets/extensions/string_rb.html
100
106
  - doc/files/lib/mack-facets/extensions/symbol_rb.html
107
+ - doc/files/lib/mack-facets/extensions/time_rb.html
108
+ - doc/files/lib/mack-facets/utils/blank_slate_rb.html
101
109
  - doc/files/lib/mack-facets/utils/inflections_rb.html
102
110
  - doc/files/lib/mack-facets/utils/inflector_rb.html
103
111
  - doc/files/lib/mack-facets/utils/options_merger_rb.html