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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fea81d83ceac37804b3999c12782705c046a0d3021f8f081506cd12b53881142
4
- data.tar.gz: 4db5344af4b73b961ca9c5b044731b225a4dcc0c33feffc9ca706f6937f32eb1
3
+ metadata.gz: 5e0eb413cad23a4b02e2c28d8712a0b1d3f06975fe8a874ab86fe7e8a81d5765
4
+ data.tar.gz: c1c9a44b65dfb2018d70861ee6fb1a82ab8464f1981b4258c129cd546363655d
5
5
  SHA512:
6
- metadata.gz: 8815915da57e67cc835336e22f8690a76914e21d76b53d682572d6de996b503f43b94d67bcb20748590f2003c168c7be3db106cc1cb73674703a06de805b27bb
7
- data.tar.gz: ec1983470aa4eaeb6ddb189057d2e20efaef17d2ee1a717bcd8db4a1c1c309fe1af222bb206f4bbbc1e880d452e5d61259c69f463ad4fe5bae25f15f3ed9d50c
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
- $ gem install imc_alves
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.calc_imc
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ImcAlves
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
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.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-07 00:00:00.000000000 Z
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: