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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d39a7af74516c2775b90dbe30f456e4bee5ea60b
4
- data.tar.gz: 663a90b0bfce2fec9703881377db0cac032e016c
3
+ metadata.gz: d4ed3affdd65e83975550cb4cb57010fe08fe400
4
+ data.tar.gz: 231c0111174e76da85c19a362bc9fbbccb4810b9
5
5
  SHA512:
6
- metadata.gz: cd9f650d42390c04015f669c2d1d3b7aaf4bc7e337e4e5145c11f48cd2014e7012c988ba51130494afc14c2da5e85239aa9b7f7b329d92f77af4e9413431ec96
7
- data.tar.gz: 109a7bf5fe2bc27c3a5650033a84cf5d99eb91f00d001f595bb57fbe3853a79d3b630497074f404c0dc0372c66ac5a5b5739f1bfabf66442f67852bfd0021e25
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
- You can see actual list of supported languages:
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
@@ -1,3 +1,3 @@
1
1
  module Kabal
2
- VERSION = "0.2.17"
2
+ VERSION = "0.2.18"
3
3
  end
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 test_all_natural_numbers_for_all_languages
6
+ def test_all_numbers_for_all_languages
7
7
  Kabal.supported_languages.each do |lang|
8
8
  Kabal.language = lang
9
- (0..10 ** 4).each do |number|
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kabal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov