BMI_ReynaCarrillo 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/calcula_bmi.rb +12 -0
  3. metadata +45 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 131381be4ffd8eb6a7405ab20ae3725aff671bb9
4
+ data.tar.gz: 166466570609ebb8998eed7edba5c75f672fc1ea
5
+ SHA512:
6
+ metadata.gz: 924bab6b7e56663affe53c8e76910915db4895a34ef1603dfff8c397e32d9d5f2475d3d95af45ce6546533a22837e47c768c25fd84c708b45394679c55ef471c
7
+ data.tar.gz: 9d31e8b4d92e07c418bd89938a85c3d2f3b7672a431d177583dabdec896038e06c5a4e9fe9f1e0ad0deb8005d4033bdbf8feec8a0d03b3de6ffb69a1bdce215a
@@ -0,0 +1,12 @@
1
+ class CalculaBmi
2
+ attr_reader :weight, :height
3
+
4
+ def initialize(weight, height)
5
+ @weight = weight
6
+ @height = height
7
+ end
8
+
9
+ def calculate_index
10
+ (weight/( height * height )).round(2) #dos decimales
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: BMI_ReynaCarrillo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Reyna Carrillo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Calcula Indice de masa corporal, ingresando unicamente el peso y altura
14
+ de una persona.
15
+ email: mareyk_07@hotmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/calcula_bmi.rb
21
+ homepage: https://github.com/ReynaCarrillo/BMI_ReynaCarrillo
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.4.8
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Calcula el BMI
45
+ test_files: []