chinese_number 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/chinese_number.rb +6 -0
- data/lib/chinese_number/version.rb +1 -1
- data/spec/chinese_number_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fbb6c1256556e75af180c6b8f789d95c9b8355e
|
4
|
+
data.tar.gz: feaf72289d42c70f875f9d0009f12dc2273b940f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 329760a6425c24d4c0b07cf94086ca7f02c052bb82dd485b9ff09018978191e5770b0ea76ffcee8ff1e8a194a303acc096a4f50270ec5c08d4f1a75928be1dc1
|
7
|
+
data.tar.gz: 6dcb28b20fb09ca5137fe3166a95eebfde904df89af152579ef816e293eb4f45aec80b10fd8a011603bafd97be1af9b7475ec55eae86611c86d7c0805f6ff363
|
data/README.md
CHANGED
@@ -27,13 +27,18 @@ ChinseNumber.trans "一年有三百六十五天"
|
|
27
27
|
可以用封装后的高级 api:
|
28
28
|
|
29
29
|
~~~ruby
|
30
|
+
require 'chinese_number'
|
31
|
+
|
30
32
|
ChinseNumber.trans "我有十块钱"
|
31
33
|
#=> "我有10块钱"
|
32
34
|
|
33
35
|
ChinseNumber.trans "二〇一四年"
|
34
36
|
#=> "2014年"
|
35
37
|
|
36
|
-
ChineseNumber.
|
38
|
+
ChineseNumber.find "每分钟六十秒的速度前进二十四小时"
|
39
|
+
#=> [{'六十' => 60}, {'二十四' => 24}]
|
40
|
+
|
41
|
+
ChineseNumber.extract "每分钟六十秒的速度前进二十四小时"
|
37
42
|
#=> [60, 24]
|
38
43
|
~~~
|
39
44
|
|
data/lib/chinese_number.rb
CHANGED
data/spec/chinese_number_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chinese_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- qhwa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|