dolar-bna 1.1.2.4 → 1.1.3

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
  SHA256:
3
- metadata.gz: 5b2aa66832a9604fa017772bfefee0305f31d623ab88b28abb75ce546622dcc5
4
- data.tar.gz: 85b25f3e2ab0fdea03a1e3994fd16a1b261c87e319633266b7a2006f7f46f073
3
+ metadata.gz: 3d352289a5b17747ea17cfa897959a93c70c958ec2d8d1084132e4da32c5ef01
4
+ data.tar.gz: 7c013f31883023fae9fa0e964537de741c5be788571275b4b52de6cbe038a477
5
5
  SHA512:
6
- metadata.gz: 79bb016f61704ed9dc20989fa09ea402d8b816f6235425797ec2721ddbfa5aaa16be843da0f54bd2c506339c591183672a215a4c33663c3206137cd71850125d
7
- data.tar.gz: dc2919057248390c6290594ffaf64c078d32665cf3668c69817706ec9bff1e0c3d87f53456ee3edd389dde4202bfdfeeeb744ecea6ab1c567fef9b49af12accf
6
+ metadata.gz: d24cecae53297f4a203ee7dfea3d4bf015df144aee5db10d2673affd74f4d17693f9198c312248d71d0fb1b049c71878f8f151b72642d4952a5aab7b33b1d2d3
7
+ data.tar.gz: 74d4ae32818d39d31809207693d9bf1675a4134db4bc02ac25071ca6b14d2edf6097ad56bd364b80ea218c52fafa6a1d5611cbc770845390c89b36acc4233fce
@@ -1,11 +1,12 @@
1
1
  module Dolar
2
2
  module Bna
3
3
  class Convert
4
- def initialize(value=0, conversion="ars_to_usd", dolar_type="Divisa", date=Date.today)
4
+ def initialize(value=0, conversion="ars_to_usd", dolar_type="Divisa", date=Date.today, aliquot=0.3)
5
5
  @value ||= value
6
6
  @conversion ||= conversion
7
7
  @dolar_type ||= dolar_type
8
8
  @date ||= date
9
+ @aliquot ||= aliquot
9
10
  end
10
11
 
11
12
  def perform
@@ -53,9 +54,10 @@ module Dolar
53
54
  return dolar_buy, dolar_sell
54
55
  end
55
56
 
56
- def ars_to_dolar dolar_buy
57
- valor = if !dolar_buy.nil?
58
- @value.to_f / dolar_buy.to_f
57
+ def ars_to_dolar dolar_sell
58
+ tax_pais = @aliquot
59
+ valor = if !dolar_sell.nil?
60
+ @value.to_f / (dolar_sell.to_f * tax_pais)
59
61
  else
60
62
  0
61
63
  end
@@ -1,5 +1,5 @@
1
1
  module Dolar
2
2
  module Bna
3
- VERSION = "1.1.2.4"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dolar-bna
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2.4
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - LITECODE