def_enum_helper 0.3.0 → 0.4.0

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
  SHA1:
3
- metadata.gz: 461321a94afff38dac2cacb8bf4b61dc7de5aa67
4
- data.tar.gz: c87bf0b00d70922fc1f7d7bc54acbd4286fcaa93
3
+ metadata.gz: edd5b5abefcbb09535b94af42a8b7019c127c2f2
4
+ data.tar.gz: 01b90f02d87a761fa00ae5f674c3f6e3967b49e2
5
5
  SHA512:
6
- metadata.gz: 22eee2d51f333aae1055d9358468655a9a787427b4b579afa6a88561e8e28d72cd82e9e0a99427de42e4dbf82a2bbca915a8e350f97a1aedd05b52d3f5dc8e54
7
- data.tar.gz: 5483ab06a9f4d6e38093ee365f63b3535d760fdbfa7094fd33a68dccbe9e1c0441e9dab56e63fd2e8d296daa1fbf0cd52087a584ca223e92e4bb9873881c2871
6
+ metadata.gz: 6e5068f60b09966bba27aa60c6d362368fa26065a8601676a66d021be4a6d16db8aee817166bb4851dcb0d93e7a82117c46def552f6e2c05a87d9342de6147b8
7
+ data.tar.gz: 61904a4a0b3d0bf9017509cfe1ec10f075df6f3590b0dbd69e8a7fff9e4311d0b7ab9009cbad03f2d3ba6338f29000106f335c93232d5959886b211da3550a1b
@@ -1,3 +1,3 @@
1
1
  module DefEnumHelper
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -82,7 +82,7 @@ end
82
82
  def define_subscript_method(m, enum_index_hash, enum_display_hash)
83
83
  divisor = enum_index_hash.count
84
84
 
85
- m.define_singleton_method(:from_number) { |n| (n - DEFAULT_ENUM_BASE_INDEX) % divisor + DEFAULT_ENUM_BASE_INDEX }
85
+ # m.define_singleton_method(:from_number) { |n| (n - DEFAULT_ENUM_BASE_INDEX) % divisor + DEFAULT_ENUM_BASE_INDEX }
86
86
  m.define_singleton_method(:[]) do |k|
87
87
  case k
88
88
  when String
@@ -90,7 +90,7 @@ def define_subscript_method(m, enum_index_hash, enum_display_hash)
90
90
  when Symbol
91
91
  enum_index_hash[const_get(k)]
92
92
  else
93
- enum_index_hash[from_number(k)]
93
+ enum_index_hash[k]
94
94
  end
95
95
  end
96
96
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: def_enum_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Zhang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler