chinese_number 0.0.1 → 0.0.2

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: 33a99a1175d29f6eb8e46a04ea4285e7215a6c78
4
- data.tar.gz: b10f7f77505b3e2b456f3481a17c03d8b7e58d74
3
+ metadata.gz: 0b07a194edcdae7fbaba6135311a7b15cdd0efe9
4
+ data.tar.gz: 03295ee4692e9cb11ce144fec33c5e2b848bc305
5
5
  SHA512:
6
- metadata.gz: dfac021e1e40ca625a6cdc5f4c4870dbfa079e9d67d624a38918d204c2c92947af3e362230eb23d0ce78d38697e90b8d6cba11cfbd7c4f2e3b03e3d39894cbfb
7
- data.tar.gz: d98a6ec17f0592f3615b86b36dd55e9b6fce6189d39a23bc56c068d3d9ed255352890d74ec3a5c99fb60e3e7b67b39affad0bb0d9bdc52456f71791af1366e8a
6
+ metadata.gz: a4a43fefd36e4bd970ce9918bff882aefe873e96f22b5717b95c0f8eeb7a6bf3f59777e948c6c478f2dd0979d2924edf96cdfb303c269dacaf982efdd8102a9b
7
+ data.tar.gz: 5efbf0030515e2e1401311686c4053404f6c65cd2c09a9ecee7da4eb6a1ec5c83593be2dc2b49f2cddd3008d9b9062c5fa01fcaa3b547bfa38ded2b14598e1cc
@@ -22,13 +22,23 @@ module ChineseNumber
22
22
  '百' => 100,
23
23
  '千' => 1000,
24
24
  '万' => 10000,
25
- '亿' => 10000_0000,
26
- '兆' => 10000_0000_0000
25
+
26
+ # “兆” 在各处有不同的意义
27
+ # 可能是 “百万”、“万亿”或“万万亿”
28
+ # see:
29
+ # http://zh.wikipedia.org/wiki/%E5%85%86
30
+ #
31
+ # 你可以通过这样的方式修改成需要的含义:
32
+ #
33
+ # ChineseNumber::Parser::MULTIPERS['兆'] = 10000_0000_0000
34
+ '兆' => 100_0000,
35
+
36
+ '亿' => 10000_0000
27
37
  }
28
38
  end
29
39
 
30
40
  DIGIT_MAP = generate_base_map.freeze
31
- MULTIPERS = generate_multipers_map.freeze
41
+ MULTIPERS = generate_multipers_map
32
42
  DIGIT_TOKEN = Regexp.new( "[#{DIGIT_MAP.keys.join}]" )
33
43
  MULTIPER_TOKEN = Regexp.new( "[#{MULTIPERS.keys.join}]" )
34
44
  TOKEN = Regexp.new( "[#{(DIGIT_MAP.keys + MULTIPERS.keys).join}]+" )
@@ -1,3 +1,3 @@
1
1
  module ChineseNumber
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chinese_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - qhwa