dohruby 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/CHANGELOG +3 -0
  2. data/lib/doh/util/num_or_self.rb +10 -0
  3. metadata +2 -1
data/CHANGELOG CHANGED
@@ -8,6 +8,9 @@
8
8
  * removed mysql dependency -- support sucks for it right now -- install it manually
9
9
  *0.1.4* (April 1st, 2008)
10
10
  * add date_only for DateTime, add current_date functionality for overriding today / now in a friendly way, added check_int
11
+ *0.1.5* (April 1st, 2008)
12
+ * add num_or_self
13
+
11
14
 
12
15
 
13
16
 
@@ -0,0 +1,10 @@
1
+ module Doh
2
+
3
+ def self.num_or_self(obj)
4
+ if obj.class == String && obj =~ /^\d+$/
5
+ return obj.to_i
6
+ end
7
+ return obj
8
+ end
9
+
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani & Kem Mason
@@ -58,6 +58,7 @@ files:
58
58
  - lib/doh/logger.rb
59
59
  - lib/doh/util
60
60
  - lib/doh/util/current_date.rb
61
+ - lib/doh/util/num_or_self.rb
61
62
  - lib/doh/util/run_tests.rb
62
63
  - lib/doh/util/options.rb
63
64
  - lib/doh/util/source_ip.rb