footing 0.0.7 → 0.0.8

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 (2) hide show
  1. data/lib/extensions/hash.rb +13 -0
  2. metadata +7 -7
@@ -37,5 +37,18 @@ module Footing
37
37
  end
38
38
  end
39
39
 
40
+ # Adjusts the values of the Hash in place.
41
+ #
42
+ # @example
43
+ # dict = {:a => 1, :b => 2, :c => 3}
44
+ # dict.adjust_values! { |v| v.to_s }
45
+ # dict # => {:a => "1", :b => "2", :c => "3"}
46
+ #
47
+ # @yield [value] Yields the current value to the block.
48
+ # The result of the block is then assigned to the corresponding key.
49
+ def adjust_values!
50
+ each { |k, v| self[k] = yield(v) }
51
+ end
52
+
40
53
  end
41
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: footing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-11 00:00:00.000000000 Z
12
+ date: 2012-09-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! " Footing provides some sanity for monkey patching practices.\n
15
- \ It's also a utility lib that contains additional functionality for core objects
16
- that you might find useful.\n"
14
+ description: ! ' Footing is a utillity belt library that employs sane monkey patching.
15
+
16
+ '
17
17
  email:
18
18
  - natehop@gmail.com
19
19
  executables: []
@@ -53,9 +53,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 1.8.10
56
+ rubygems_version: 1.8.24
57
57
  signing_key:
58
58
  specification_version: 3
59
- summary: Foundational patching lib.
59
+ summary: A utility belt library.
60
60
  test_files: []
61
61
  has_rdoc: