meta_enum 2.0.0 → 2.0.1

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: ae4f6d4921c00b29216e850aa59e679b34c3eba7d5cf9d5ae9365a69c81b75aa
4
- data.tar.gz: fc7018df488e1de04230d58a9d5b8181ea9686157dd0dee48fa48e97c180b20f
3
+ metadata.gz: c864943910fad7b9ca83fbcfa8a8e514c5a9675e669e3f45ec5bc32e924d85c3
4
+ data.tar.gz: 64be15e7024853f90efb66fff368d3afb8b0093957ee9d010dbc31bd5ec7bc0e
5
5
  SHA512:
6
- metadata.gz: fdfd752d85a7df06677a109c44fb75589e2e494312a90860dc5b878cce6ab02de618154775c715251bf3e8bb3a5274d3e62d02cbdb71b7ed08f41247481998b1
7
- data.tar.gz: a1ec0eb6670569f0bb5efa36b04c6406269b519d2313201c8c5d1fcc2be0eea641b714733f712392d05dd6e692d680f17e3aff37d243e91c3d8737321ad00cb4
6
+ metadata.gz: b350f51a27a0f119d2258a67de7fe29baf2f7a23fc64c0c4c43101e95cfcb27e21f7e3a49751d3365630f76dccd7379548705c573b826486f24baca2ce7a5448
7
+ data.tar.gz: 4ab4a6437a9490ba25bbaf9c607c500c4b935278f2991c41836a26a7d4fea0c5193b502bed7837a0a1f7656469b26c6a82594230b9483c7a1f26b7f70ca8e894
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1 (February 8, 2018)
4
+
5
+ * Fix MetaEnum::Type#inspect
6
+ * Documentation improvements
7
+
3
8
  ## 2.0.0 (January 27, 2018)
4
9
 
5
10
  Support non-integer values.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meta_enum (2.0.0)
4
+ meta_enum (2.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -59,14 +59,14 @@ module MetaEnum
59
59
  # [] is a "do what I mean" operator. It returns the Element from this type depending on the key.
60
60
  #
61
61
  # When key is a symbol, it is considered the name of the Element to return.
62
- # Since symbols are used from number, it is considered an error if the key is
62
+ # Since symbols are used from code, it is considered an error if the key is
63
63
  # not found and it raises an exception.
64
64
  #
65
- # When key can be converted to an integer by Integer(), then it is
66
- # considered the number of the Element to return. Retrieving by number is
65
+ # When key can be converted to an integer by value_normalizer, then it is
66
+ # considered the value of the Element to return. Retrieving by value is
67
67
  # presumed to converting from external data where a missing value should not
68
- # be considered fatal. In this case it returns a MissingElement is with number
69
- # as the key. This allows a Type to only specify the values is needs while
68
+ # be considered fatal. In this case it returns a MissingElement is with value
69
+ # as the key. This allows a Type to only specify the values it needs while
70
70
  # passing through the others unmodified.
71
71
  #
72
72
  # Finally, when key is a MetaEnum::Element, it is simply returned (unless it
@@ -87,7 +87,7 @@ module MetaEnum
87
87
  end
88
88
 
89
89
  def inspect
90
- sprintf('#<%s: {%s}>', self.class, elements.to_a.map { |v| "#{v.name}: #{v.number}"}.join(", "))
90
+ sprintf('#<%s: {%s}>', self.class, elements.to_a.map { |v| "#{v.name}: #{v.value}"}.join(", "))
91
91
  end
92
92
 
93
93
  def size
@@ -1,3 +1,3 @@
1
1
  module MetaEnum
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Christensen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-27 00:00:00.000000000 Z
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler