set_theory 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/set_theory/symmetric_difference.rb +5 -0
- data/lib/set_theory/union.rb +1 -1
- data/lib/set_theory/version.rb +1 -1
- data/lib/set_theory.rb +1 -0
- data/spec/set_theory/symmetric_difference_spec.rb +13 -0
- metadata +4 -1
data/README.md
CHANGED
data/lib/set_theory/union.rb
CHANGED
data/lib/set_theory/version.rb
CHANGED
data/lib/set_theory.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'set_theory/symmetric_difference'
|
2
|
+
|
3
|
+
describe Array do
|
4
|
+
it 'responds to #symmetric_difference' do
|
5
|
+
Array.new.respond_to?(:symmetric_difference).should be
|
6
|
+
end
|
7
|
+
|
8
|
+
describe '#symmetric_difference' do
|
9
|
+
it 'performs the symmetric_difference of two sets' do
|
10
|
+
([1, 2, 3].symmetric_difference [2, 3, 4]).should eql [1, 4]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: set_theory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tim Preston
|
@@ -90,12 +90,14 @@ files:
|
|
90
90
|
- lib/set_theory/difference.rb
|
91
91
|
- lib/set_theory/intersection.rb
|
92
92
|
- lib/set_theory/member_of.rb
|
93
|
+
- lib/set_theory/symmetric_difference.rb
|
93
94
|
- lib/set_theory/union.rb
|
94
95
|
- lib/set_theory/version.rb
|
95
96
|
- set_theory.gemspec
|
96
97
|
- spec/set_theory/difference_spec.rb
|
97
98
|
- spec/set_theory/intersection_spec.rb
|
98
99
|
- spec/set_theory/member_of_spec.rb
|
100
|
+
- spec/set_theory/symmetric_difference_spec.rb
|
99
101
|
- spec/set_theory/union_spec.rb
|
100
102
|
has_rdoc: true
|
101
103
|
homepage: http://github.com/tehpeh/set_theory
|
@@ -129,4 +131,5 @@ test_files:
|
|
129
131
|
- spec/set_theory/difference_spec.rb
|
130
132
|
- spec/set_theory/intersection_spec.rb
|
131
133
|
- spec/set_theory/member_of_spec.rb
|
134
|
+
- spec/set_theory/symmetric_difference_spec.rb
|
132
135
|
- spec/set_theory/union_spec.rb
|