bmi-thenaox 0.1.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/body_mass_index.rb +11 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d30c9910dcc45718a5a9c9977bcfd78518a01e79
4
+ data.tar.gz: 0b930a50db038b5640e7eab9f4e1e726bcfceae9
5
+ SHA512:
6
+ metadata.gz: a3db1ccce257d1f297c967b5e1828024fcd3eb1191da98922bd25e4c08bf2f0cb7b144f19db9d467b81429f66ef863287e950ec45097930fdcdfac07647bf43b
7
+ data.tar.gz: 1ab2c8fce667906f68a6d77211eef993ce37516d33b187f0eaea67f86ea4723c36a981b294707973195a02790596701eb4e0998b93cac57b844ded77e9c1047a
@@ -0,0 +1,11 @@
1
+ class BodyMassIndex
2
+ attr_reader :mass, :height
3
+
4
+ def initialize(mass, height)
5
+ @mass, @height = mass, height
6
+ end
7
+
8
+ def calculate_index
9
+ (mass / ( height ** 2 )).round(2)
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bmi-thenaox
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Antonio Chavez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Body mass index calculator class that uses the metric system only
14
+ email: cavjzz@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/body_mass_index.rb
20
+ homepage: http://github.com/TheNaoX/bmi
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: Body Mass Index calculator class
44
+ test_files: []