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 +4 -4
- data/README.md +4 -0
- data/lib/solver.rb +5 -1
- data/lib/time_value/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfd9c635a1aa2c4a1ac28d754af26c20c84b85ba
|
4
|
+
data.tar.gz: ea0b879e8271ddf74d96d3dae0a8a1064eec3b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
data/lib/solver.rb
CHANGED
@@ -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
|
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
|
data/lib/time_value/version.rb
CHANGED
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.
|
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.
|
60
|
+
rubygems_version: 2.6.11
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Time value of money financial calculations
|