exonio 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca4e5b35139265ba594d5146efee24fd9511a8b4
4
- data.tar.gz: 31addf7c1d0e5d28a49b27d8537a713e2c12651d
3
+ metadata.gz: a888200fad55e64a4463fb14cfed612a21508284
4
+ data.tar.gz: b899480a38dcdbb0cc871808d6a5e5466155b355
5
5
  SHA512:
6
- metadata.gz: c082906456fc5cc853a11f6fc70f45886920053d662322a4b686122b849152875b19d011cbd4078229d17de419a7f939282b92270c9ed6834eefe7bf72b64b62
7
- data.tar.gz: d98d28a9b7705a7dfe6343d9fb3bc26f6a689aed5e39272e24879349b75278ddaf25b616f0e75a7f426d612cdbe969d4f7f5edd6fded4b09b4740727b2524ea3
6
+ metadata.gz: f4d9d4cd5b6ca55db1782840231646007c280deed75aa270dd8014178306d60126b85154d9eabc788823d873ab43429883abf33be1fa0a1411c8ffef9fbbea34
7
+ data.tar.gz: 76aeef0b2493046aa21ecf710d2f48f59008e95a69afbc2ac11d9eeac7716057ecc4dfdec52b93dc73abd2a09e9db2d9cac6598bad5095e7e34ed2e46d7d600d
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.5.1
4
+
5
+ * Fix the FloatDomainError exception
6
+
3
7
  ## 0.5.0
4
8
 
5
9
  * Implements `irr` and `npv` method
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exonio (0.5.0)
4
+ exonio (0.5.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -5,8 +5,7 @@ require 'exonio/version'
5
5
  require 'exonio/financial'
6
6
  require 'exonio/helpers'
7
7
 
8
- include Newton
9
-
10
8
  module Exonio
9
+ extend Newton
11
10
  extend Financial
12
11
  end
@@ -159,7 +159,7 @@ module Exonio
159
159
  total = 0
160
160
 
161
161
  cashflows.each_with_index do |cashflow, index|
162
- total += cashflow / (1 + discount) ** (index + 1)
162
+ total += (cashflow.to_f / (1 + discount.to_f) ** (index + 1))
163
163
  end
164
164
 
165
165
  total
@@ -1,3 +1,3 @@
1
1
  module Exonio
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exonio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Izidoro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler