sloubi 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sloubi.rb +7 -1
- 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: 8da689ea2c2ef2635bf38b8ebb21f0462ee02d8a
|
4
|
+
data.tar.gz: a8fdf1e6ba272cfce24fbc14573c2d29b9377a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea8d1b41913ecfb4f56808385cdc553d7a04ea5484b3edc0d4cbaa9031faa0203183ff4f0a1134ba298abf86db2ebc18aa47bbb90ed1a6179d67f00bd66eca2b
|
7
|
+
data.tar.gz: 91a1748988b061677366ea5bea1c074bcb37cdade082f073d17427aae81ef48de5818405af8e332080da3ce86b1cbbf6932476a9c02dfb5013157a3a8614d71e
|
data/lib/sloubi.rb
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
module Sloubi
|
4
4
|
class Sloubi
|
5
|
-
|
5
|
+
#count sloubi from n to ninit. if v is true, it will be said
|
6
|
+
def self.count n=42, ninit=1, v=false
|
6
7
|
return 0 if !n.is_a?Integer or n < 1
|
7
8
|
return 0 if ninit > n
|
8
9
|
(ninit..n).each do |i|
|
@@ -18,5 +19,10 @@ module Sloubi
|
|
18
19
|
end
|
19
20
|
return i
|
20
21
|
end
|
22
|
+
|
23
|
+
#obsolet alias of count
|
24
|
+
def self.count_sloubi n=42, ninit=1, v=false
|
25
|
+
Sloubi::Sloubi.count n, ninit, v
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|