inum 5.1.0 → 5.1.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
  SHA1:
3
- metadata.gz: e23a5e942d7583617ddbcd45931e9d4850394efe
4
- data.tar.gz: 5b2ddbd32432205959846d2199390b331ff8a123
3
+ metadata.gz: 92efa81161155f336cb84f1e2f6ae43dfa7e3dbe
4
+ data.tar.gz: f9e80cd38edae6fca9d49b70561d90833addec3c
5
5
  SHA512:
6
- metadata.gz: 5a4753423085581b73eba9cdea2eb01310abc255f72f2385cf09b35451eb08f7e4d6503576f9e4612647e6b215975124a77b88a0feb8ee154dad466a8c71957a
7
- data.tar.gz: 8338f1d3b44ca69bfd43e34d33828b95968d7a66decdb777f8aefba3824ea91b081bad13718f054b363e150a2fb0877aada60f0a5309545093f4ae2cf107e654
6
+ metadata.gz: 8bc684c912cd842f6e54b0f4f7a1591e33949a2681ef703f4266ce6c2c3c8dbb96e872df1794a6d9870832cf1ec00569287b11e327484778c10a00580bd832d7
7
+ data.tar.gz: ea2395a6da2f5c111412726a62c1f1af97a90d370875d725f6c98c3e5326dbf0fa397e5f886df951389f34b1f2021c9c86ba476236dde87eb6dd71c48639229b
data/README.md CHANGED
@@ -40,6 +40,7 @@ How to use Enum(Inum).
40
40
  p AnimeTypes::EVANGELION.label # => :EVANGELION
41
41
  p AnimeTypes::EVANGELION.to_s # => "EVANGELION"
42
42
  p AnimeTypes::EVANGELION.downcase # => "evangelion"
43
+ p AnimeTypes::EVANGELION.underscore # => "evangelion"
43
44
  p AnimeTypes::EVANGELION.upcase # => "EVANGELION"
44
45
  p AnimeTypes::EVANGELION.value # => 0 (can use to_i.)
45
46
  p AnimeTypes::EVANGELION.translate # => エヴァンゲリオン (I18n.t will be called with `anime_types.evangelion`.)
@@ -179,8 +179,8 @@ module Inum
179
179
  if /^\d+$/.match(object)
180
180
  parse(object.to_i)
181
181
  else
182
- downcase = object.downcase
183
- find {|e| e.downcase == downcase}
182
+ underscore = object.underscore
183
+ find {|e| e.underscore == underscore}
184
184
  end
185
185
  when Symbol
186
186
  parse(object.to_s)
@@ -1,3 +1,3 @@
1
1
  module Inum
2
- VERSION = '5.1.0'
2
+ VERSION = '5.1.1'
3
3
  end
@@ -299,14 +299,14 @@ describe Inum::Base do
299
299
  let(:destination) { Anime::BakuOn }
300
300
 
301
301
  context 'When source is string' do
302
- let(:source) { 'Bakuon' }
302
+ let(:source) { 'baku_on' }
303
303
  it 'Return inum.' do
304
304
  subject
305
305
  end
306
306
  end
307
307
 
308
308
  context 'When source is symbol' do
309
- let(:source) { :bakuon }
309
+ let(:source) { :baku_on }
310
310
  it 'Return inum.' do
311
311
  subject
312
312
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inum
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alfa-jpn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler