time_value 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 125ac13adfd017e9912100ca5379a5d1b1f6c0a6
4
- data.tar.gz: 0a691265066fc1597abaa7d5e8a69d1fb09146ff
3
+ metadata.gz: bfd9c635a1aa2c4a1ac28d754af26c20c84b85ba
4
+ data.tar.gz: ea0b879e8271ddf74d96d3dae0a8a1064eec3b08
5
5
  SHA512:
6
- metadata.gz: b09fe3c3e051cc614c480846e9a39fbf0d61134fee5b4ac2510d2ec37ebb2a93320f50d1d925b288b86c96d6b683f350e3a7ead749d40f180998680c1070268e
7
- data.tar.gz: e45ce1920fb62efd73ae0b5cb325ddcf858cbc09ad7973a6da234ded017d03c23089048b759e4b7de86a9ee0bced90e8d48cbd6edb091aeb76ef215ca9b60bce
6
+ metadata.gz: c8353fb3f10ecac97b7656c48c869d82969f6348ed391ade3c69ab48af75074bf635838ea6357a9ec5e6d3846f732c4aafa6471531a42e5c994167568c981057
7
+ data.tar.gz: 2baf0a1dd2d367694fcf95243d111ad67420006f3865400c0443a4adc157235bd5528128d0563a1ea10fa69534b2a9b58cccc518520d4fd23a2dcf1eb0005f00
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ [![CircleCI](https://circleci.com/gh/randallreedjr/time_value/tree/master.svg?style=shield)](https://circleci.com/gh/randallreedjr/time_value/tree/master)
2
+ [![Gem Version](https://badge.fury.io/rb/time_value.svg)](https://badge.fury.io/rb/time_value)
3
+ [![Code Climate](https://codeclimate.com/github/randallreedjr/time_value/badges/gpa.svg)](https://codeclimate.com/github/randallreedjr/time_value)
4
+
1
5
  # Time Value of Money calculator
2
6
 
3
7
  ## Performs financial calculations for:
@@ -25,7 +25,7 @@ class Solver
25
25
  end
26
26
  # TODO: This will not handle the case where the 20th iteration
27
27
  # finds the solution
28
- return rate if iteration_count < MAX_ITERATIONS
28
+ return rounded_rate if iteration_count < MAX_ITERATIONS
29
29
  rescue FloatDomainError
30
30
  return nil
31
31
  end
@@ -53,6 +53,10 @@ class Solver
53
53
  end
54
54
 
55
55
  def rate
56
+ time_value.i
57
+ end
58
+
59
+ def rounded_rate
56
60
  time_value.i.round(2)
57
61
  end
58
62
  end
@@ -1,3 +1,3 @@
1
1
  module TimeValue
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_value
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randall Reed, Jr.
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 2.5.1
60
+ rubygems_version: 2.6.11
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Time value of money financial calculations