imc_alves 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +5 -3
- data/lib/imc_alves/version.rb +1 -1
- data/lib/imc_alves.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0eb413cad23a4b02e2c28d8712a0b1d3f06975fe8a874ab86fe7e8a81d5765
|
4
|
+
data.tar.gz: c1c9a44b65dfb2018d70861ee6fb1a82ab8464f1981b4258c129cd546363655d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10180531185699c8d682186e227e2f4cc9a09943ddfaed5192095e28563abeb39ac3460fdc1543b1d1c1e5c7b364e3566b69e23c597bed44f267b498b49371c4
|
7
|
+
data.tar.gz: f4d1a81db29d7168d734ae33edd5eb96a6dcf765226b8f68dee91aefcf823bd7a4944b12dc6436039aeb44ebd926746063af6cacc0a014fb5289245d6ba1b4ac
|
data/README.md
CHANGED
@@ -3,18 +3,20 @@
|
|
3
3
|
Gem desenvolvida para calcular o imc e mostrar o Estado Nutricional da pessoa.
|
4
4
|
|
5
5
|
## Installation
|
6
|
-
|
6
|
+
gem install imc_alves
|
7
7
|
|
8
8
|
## Usage
|
9
9
|
|
10
10
|
obj = ImcAlves::Pessoa.new(peso, altura)
|
11
11
|
|
12
|
-
print obj.
|
12
|
+
print obj.imc
|
13
|
+
print obj.estado_nutricional
|
14
|
+
|
13
15
|
print obj.status
|
14
16
|
|
15
17
|
## Contributing
|
16
18
|
|
17
|
-
email@example.com
|
19
|
+
email@example.com
|
18
20
|
|
19
21
|
## License
|
20
22
|
|
data/lib/imc_alves/version.rb
CHANGED
data/lib/imc_alves.rb
CHANGED
@@ -31,10 +31,6 @@ module ImcAlves
|
|
31
31
|
@estado_nutricional = est_nutri
|
32
32
|
end
|
33
33
|
|
34
|
-
def calc_imc
|
35
|
-
(@peso / @altura**2).round(2)
|
36
|
-
end
|
37
|
-
|
38
34
|
def status
|
39
35
|
puts "IMC: #{@imc}"
|
40
36
|
puts "Estado Nutricional: #{@estado_nutricional}"
|
@@ -49,6 +45,10 @@ module ImcAlves
|
|
49
45
|
|
50
46
|
private
|
51
47
|
|
48
|
+
def calc_imc
|
49
|
+
(@peso / @altura**2).round(2)
|
50
|
+
end
|
51
|
+
|
52
52
|
def est_nutri
|
53
53
|
@est_nut.each do |k, v|
|
54
54
|
return k if @imc < v[0]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imc_alves
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guinn83
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Calcular o IMC e mostrar o Estado Nutricional da pessoa
|
14
14
|
email:
|