dietary_dsl 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad41b81801c85ca443e980827a5406499051862a
|
4
|
+
data.tar.gz: b19ab754323d2a0ba736655eded800d933924e1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56bc71fba5af55a4b199052b76ffe6035e03195b1c99cb4c74c8d7950e9dc688fb34f647f1d6031fbb8bc81aac6a80e8c07da49b658e8c3b2e17caa8992abfe9
|
7
|
+
data.tar.gz: b671ffe188c5ddb889980940c51876fbd4090abf2458cb81602e48785740ce46b9e815f2b427916d728ad8058282524f515a68423eb6bbdc7205ee64959cb04b
|
data/lib/dietary_dsl/dsl/dia.rb
CHANGED
@@ -16,12 +16,10 @@ module DietaryDsl
|
|
16
16
|
def to_s
|
17
17
|
if @cantidad < 1000
|
18
18
|
"#{small.to_i}#{@small_postfix}"
|
19
|
+
elsif big == big.to_i
|
20
|
+
"#{big.to_i}#{@big_postfix}"
|
19
21
|
else
|
20
|
-
|
21
|
-
"#{big.to_i}#{@big_postfix}"
|
22
|
-
else
|
23
|
-
"#{big.round(1)}#{@big_postfix}"
|
24
|
-
end
|
22
|
+
"#{big.round(1)}#{@big_postfix}"
|
25
23
|
end
|
26
24
|
end
|
27
25
|
end
|
@@ -8,8 +8,8 @@ module DietaryDsl
|
|
8
8
|
def initialize(en_ml)
|
9
9
|
super(en_ml)
|
10
10
|
@cantidad = cantidad.to_f
|
11
|
-
@small_postfix =
|
12
|
-
@big_postfix =
|
11
|
+
@small_postfix = 'ml'
|
12
|
+
@big_postfix = 'L'
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.l(number)
|
@@ -25,7 +25,7 @@ module DietaryDsl
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.cucharada(number)
|
28
|
-
Volumen.new(number *
|
28
|
+
Volumen.new(number * 15.0)
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.vaso(number)
|
data/lib/dietary_dsl/version.rb
CHANGED