sbif 0.2 → 0.2.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.
Files changed (3) hide show
  1. data/History.txt +4 -0
  2. data/lib/sbif.rb +3 -2
  3. metadata +1 -1
data/History.txt CHANGED
@@ -8,3 +8,7 @@
8
8
  * Various fixes and improvements
9
9
  * Basic functionality as it should be
10
10
 
11
+ === 0.2.1 / 2011-11-12
12
+
13
+ * Fixed compability with Ruby 1.8.7
14
+
data/lib/sbif.rb CHANGED
@@ -4,7 +4,7 @@ require 'date'
4
4
 
5
5
  class SBIF
6
6
 
7
- VERSION = "0.2"
7
+ VERSION = "0.2.1"
8
8
  SITE = "http://api.sbif.cl/api-sbif/recursos"
9
9
  INDICATORS = %w(uf utm dolar euro)
10
10
 
@@ -16,7 +16,8 @@ class SBIF
16
16
 
17
17
  INDICATORS.each do |currency|
18
18
  method_name = currency.to_sym
19
- define_method(method_name) do |date = {}|
19
+ define_method(method_name) do |*args|
20
+ date = args[0] || {}
20
21
  get_data(currency, date)
21
22
  end
22
23
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sbif
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.2"
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Patricio Bruna