darkhelmet-darkext 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Manifest.txt +1 -0
  2. data/lib/darkext/object.rb +6 -0
  3. metadata +4 -3
data/Manifest.txt CHANGED
@@ -13,6 +13,7 @@ lib/darkext/hash.rb
13
13
  lib/darkext/integer.rb
14
14
  lib/darkext/io.rb
15
15
  lib/darkext/numeric.rb
16
+ lib/darkext/object.rb
16
17
  lib/darkext/statistics.rb
17
18
  lib/darkext/string.rb
18
19
  lib/darkext/symbol.rb
@@ -0,0 +1,6 @@
1
+ class Object
2
+ def try(*args, &block)
3
+ return if self.nil?
4
+ block.given? ? yield(self) : self.__send__(args.shift, *args)
5
+ end
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkhelmet-darkext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Huckstep
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-11 00:00:00 -08:00
12
+ date: 2008-12-19 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.1.0
22
+ version: 1.2.1
23
23
  version:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: hoe
@@ -56,6 +56,7 @@ files:
56
56
  - lib/darkext/integer.rb
57
57
  - lib/darkext/io.rb
58
58
  - lib/darkext/numeric.rb
59
+ - lib/darkext/object.rb
59
60
  - lib/darkext/statistics.rb
60
61
  - lib/darkext/string.rb
61
62
  - lib/darkext/symbol.rb