bmi_reyna 1.0.0

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_imc.rb +11 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7e81e71b98f5585d44aff721af04c95a96891d20
4
+ data.tar.gz: b3fe8117b1dc285ebd6588b2b71ac4692b887f10
5
+ SHA512:
6
+ metadata.gz: 0dff582bcc95a2be2c0815c2d2d8d3cdf8bad736effd12c2b7f088d6aecaa8468e6c74cea96cf29c9e4543293777589265222943cbc2eed5091c3bd73ed1582d
7
+ data.tar.gz: e91af6c399bb589e6a161e9812bdc41559a9739db1cce38daa26e4f56c7170d14b1258c80c41b48f9638d5f8d88447534a4ba4c50a8fb3190b6f90189f131f1a
@@ -0,0 +1,11 @@
1
+ class CalculaImc
2
+ attr_reader :height, :mass
3
+ def initialize (height, mass)
4
+ @height, @mass = height, mass
5
+ end
6
+ def calculate
7
+ (@mass/(@height**2)).round(2)
8
+ end
9
+ end
10
+ x=CalculaImc.new(1.73,68)
11
+ puts (x.calculate).to_s
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bmi_reyna
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Reyna Carrillo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Primer gema
14
+ email: mareyk_07@hotmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/calcula_imc.rb
20
+ homepage: https://github.com/ReynaCarrillo
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.4.8
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Ejemplo
44
+ test_files: []