evt-collection 2.2.0.0 → 2.3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/collection/set.rb +11 -1
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab6451e06f3abb021b21a5232857facee20e80862b61a32dfc9b3359ea81d057
4
- data.tar.gz: 7e32f1ad8c68d713dda198b514b4d4e2ec2d2c8403a26af65a3fa7d2b31bfa82
3
+ metadata.gz: 41b5abd8c9b23084b29c701eaad95f9b175a5b0dfeec6bb7a5298c7f90ef48d9
4
+ data.tar.gz: a5978352d642af44dca0c31b96c1a91dd7b44c225381a3be1fbdb99f7c3ffcba
5
5
  SHA512:
6
- metadata.gz: c18777acf050dc625c561f8bae1678df8c178ef6fa36b756802a254b0b48bcc154ff10b2e58cf4ac3fbc0257f3ec927391be3f8dac0fcdf56682662cb44bc81c
7
- data.tar.gz: 05dee246d071b2fbb32bf87d49382f6c326eb858f6301d869df4cc0a656451606c5029b8e6446614ec3c11154a9365ae8379e5dac98e5f871d4e6ae727ce123d
6
+ metadata.gz: 61b55f4b39f901858ee8f623ce105bfebd49093aa9495e39fc1851d096f29b8422d6c730e19d95b8f122f0a0b77d346362cfc79c08ab6b4f0fd86c9d5ef26848
7
+ data.tar.gz: 902731c7fa012e623ff11424db7b38de0e97ff09b2fca2d4f979d2a90916cd0e933bb25de3a235a2b6c544799d66c6d5b0c66415aed2aa66fda8cd94e03bf6e2
@@ -50,6 +50,11 @@ module Collection
50
50
  class_name
51
51
  end
52
52
 
53
+ def ==(other)
54
+ other.class == self.class && other.type_parameter == self.type_parameter && other.content == self.content
55
+ end
56
+ alias :eql? :==
57
+
53
58
  def add(val)
54
59
  vals = Array(val)
55
60
 
@@ -94,7 +99,12 @@ module Collection
94
99
  content.length
95
100
  end
96
101
  alias :size :length
97
- alias :count :length
102
+
103
+ def clear
104
+ content.clear
105
+
106
+ self
107
+ end
98
108
 
99
109
  def content
100
110
  @content ||= ::Set.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-collection
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0.0
4
+ version: 2.3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_bench
@@ -40,7 +40,7 @@ homepage: https://github.com/eventide-project/collection
40
40
  licenses:
41
41
  - MIT
42
42
  metadata: {}
43
- post_install_message:
43
+ post_install_message:
44
44
  rdoc_options: []
45
45
  require_paths:
46
46
  - lib
@@ -55,8 +55,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  requirements: []
58
- rubygems_version: 3.0.1
59
- signing_key:
58
+ rubygems_version: 3.1.2
59
+ signing_key:
60
60
  specification_version: 4
61
61
  summary: Type-checked set
62
62
  test_files: []