kim 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.
data/README CHANGED
@@ -17,3 +17,10 @@ Provide multiple keys and it will tell you if they are contained in the current
17
17
  ### deep_value
18
18
 
19
19
  Finds a value taking nesting into account
20
+
21
+ Fixnum
22
+ ------
23
+
24
+ ### sign
25
+
26
+ Returns 1 or -1 matching the sign of the current fixnum
data/README.md CHANGED
@@ -17,3 +17,10 @@ Provide multiple keys and it will tell you if they are contained in the current
17
17
  ### deep_value
18
18
 
19
19
  Finds a value taking nesting into account
20
+
21
+ Fixnum
22
+ ------
23
+
24
+ ### sign
25
+
26
+ Returns 1 or -1 matching the sign of the current fixnum
data/lib/kim/fixnum.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Fixnum
2
+ def sign
3
+ self / self.abs
4
+ end
5
+ end
data/lib/kim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kim
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/kim.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require "kim/version"
2
2
 
3
3
  require "kim/hash"
4
+ require "kim/fixnum"
@@ -0,0 +1,6 @@
1
+ describe Fixnum do
2
+ it "should return the right sign" do
3
+ -123.sign.should == -1
4
+ 123.sign.should == 1
5
+ end
6
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kim
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Giancarlo Palavicini
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-02 00:00:00 Z
18
+ date: 2011-09-05 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
@@ -49,8 +49,10 @@ files:
49
49
  - Rakefile
50
50
  - kim.gemspec
51
51
  - lib/kim.rb
52
+ - lib/kim/fixnum.rb
52
53
  - lib/kim/hash.rb
53
54
  - lib/kim/version.rb
55
+ - spec/hash/fixnum_spec.rb
54
56
  - spec/hash/hash_spec.rb
55
57
  - spec/spec_helper.rb
56
58
  homepage: ""
@@ -87,5 +89,6 @@ signing_key:
87
89
  specification_version: 3
88
90
  summary: Improvements to several Ruby classes
89
91
  test_files:
92
+ - spec/hash/fixnum_spec.rb
90
93
  - spec/hash/hash_spec.rb
91
94
  - spec/spec_helper.rb