easy_enum 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca22fe319521f113ccf89ffa7c57e37e5ec169d855dc2b399238bb2acf0b47d0
4
- data.tar.gz: b90a020a067577b459acbf42791f077db7e50640db2c2047ce9eab0bb34ea4b7
3
+ metadata.gz: f8e801dd2482a45239159ccdd298a10340f663ad2b25120b82b636c1fc510819
4
+ data.tar.gz: 0a8c83478146c2c526ff7bec80fb8cd6ed404d39d807fcdbd40d245b06700b2d
5
5
  SHA512:
6
- metadata.gz: f8c37e4a59f9a323ebadc99675ec63be8d3cf58e017d2258c98723b6864546d96453225b430fb6fb82c8c2751ccda79b95e6ed08a423024877d4a01dc77d2a57
7
- data.tar.gz: 96fc09cd3949833b3a8d79feea33c4c2db1179c57ea4ad97eb809c87aab616332df9cbb97d7bd74bb5598d3f74a14a3798e3137b6579eefab7ca5c1f60d583fe
6
+ metadata.gz: 9804bf6a4de39758c3c8d6f6d6431cf07a485cfa881f910f402ea301b9694d6560ceba5664171526ee5711833d0bf768d64fb151ba5174533d0445abf4e99c82
7
+ data.tar.gz: 22fdb9ee7fc4d4bb4359254ccf8326d1a8590fd8149512dc3a41682a7002a8ae65ff51c6ae6fec469e87acb399bfc626b11a77bfe4c4bcc174bee54785eed76a
data/lib/easy_enum.rb CHANGED
@@ -5,5 +5,6 @@ require 'easy_enum/easy_enum'
5
5
 
6
6
  module EasyEnum
7
7
  class ValueNotInEnum < StandardError; end
8
+
8
9
  class KeyNotInEnum < StandardError; end
9
10
  end
@@ -78,9 +78,10 @@ module EasyEnum
78
78
  end
79
79
 
80
80
  def ==(other)
81
- if other.is_a? self.class
81
+ case other
82
+ when self.class
82
83
  other.key == key
83
- elsif other.is_a? Symbol
84
+ when Symbol
84
85
  other == key
85
86
  else
86
87
  other == value
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyEnum
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-10 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.81.0
61
+ version: 1.14.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.81.0
68
+ version: 1.14.0
69
69
  description: Turn any Ruby class in an easy to use enum
70
70
  email:
71
71
  - marco.roth@intergga.ch
@@ -82,7 +82,7 @@ homepage: https://github.com/marcoroth/easy_enum
82
82
  licenses:
83
83
  - MIT
84
84
  metadata: {}
85
- post_install_message:
85
+ post_install_message:
86
86
  rdoc_options: []
87
87
  require_paths:
88
88
  - lib
@@ -90,15 +90,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - ">="
92
92
  - !ruby/object:Gem::Version
93
- version: '0'
93
+ version: '2.5'
94
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.0.3
101
- signing_key:
100
+ rubygems_version: 3.2.15
101
+ signing_key:
102
102
  specification_version: 4
103
103
  summary: Turn any Ruby class in an easy to use enum
104
104
  test_files: []