kabal 0.2.17 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/kabal/version.rb +1 -1
- data/test/lib/bigtest.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ed3affdd65e83975550cb4cb57010fe08fe400
|
4
|
+
data.tar.gz: 231c0111174e76da85c19a362bc9fbbccb4810b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abf371957a31c4b2f45822a6854aa24beb592b15bc5cebf4452420b10cbe6239269bdbb1140beab336f8f20aaa10104199e435fea55972fd122949bbc2fde6b4
|
7
|
+
data.tar.gz: a441b618c385349783780575b99d586520c60b09ac769275ded50c53359da8b9428a6ffdcaf7f851c7755bf194efff74be8d5e276886d6af0bb66185f7bfd444
|
data/README.md
CHANGED
@@ -47,13 +47,22 @@ Supported Languages:
|
|
47
47
|
* Negative Numbers
|
48
48
|
* English
|
49
49
|
* Natural Numbers { max 10 ** 63 }
|
50
|
+
* Fractional Numbers
|
50
51
|
* Negative Numbers
|
51
52
|
|
52
53
|
*More languages will be added later.*
|
53
54
|
|
54
|
-
|
55
|
+
Some interfaces:
|
55
56
|
|
56
57
|
$> Kabal.supported_languages #=> ["Russian", "English"]
|
58
|
+
$> Kabal.to_text_in_language(1, "English") #=> "one"
|
59
|
+
$> Kabal.to_text_in_language_by_index(1, 0) #=> "один"
|
60
|
+
$> Kabal.current_language_supports_natural? #=> true
|
61
|
+
$> Kabal.current_language_supports_fractional? #=> true
|
62
|
+
$> Kabal.language_supports_negative? #=> true
|
63
|
+
$> Kabal.language_supports_fractional? #= true
|
64
|
+
$> Kabal.maximum_for "Russian" #=> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
65
|
+
$> Kabal.minimum_for "English" #=> -999999999999999999999999999999999999999999999999999999999999999999
|
57
66
|
|
58
67
|
## Contributing
|
59
68
|
|
data/lib/kabal/version.rb
CHANGED
data/test/lib/bigtest.rb
CHANGED
@@ -3,10 +3,10 @@ require "test_helper"
|
|
3
3
|
include Kabal
|
4
4
|
|
5
5
|
class BigTest < TestCase
|
6
|
-
def
|
6
|
+
def test_all_numbers_for_all_languages
|
7
7
|
Kabal.supported_languages.each do |lang|
|
8
8
|
Kabal.language = lang
|
9
|
-
(
|
9
|
+
(-(10 ** 4)..10 ** 4).each do |number|
|
10
10
|
assert Kabal.to_text(number), [lang, number].to_s
|
11
11
|
end
|
12
12
|
end
|