currency_spy 0.0.3 → 0.0.4
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.
- data/lib/currency_spy/version.rb +1 -1
- data/lib/currency_spy/walutomat.rb +2 -3
- metadata +3 -3
data/lib/currency_spy/version.rb
CHANGED
@@ -18,7 +18,7 @@ module CurrencySpy
|
|
18
18
|
def medium_rate
|
19
19
|
regexp = Regexp.new("#{currency_code} / PLN")
|
20
20
|
res = nil
|
21
|
-
page.search("//
|
21
|
+
page.search("//span[@name='pair']").each do |td|
|
22
22
|
if (regexp.match(td.content))
|
23
23
|
res = td.next_element.content.to_f
|
24
24
|
end
|
@@ -29,9 +29,8 @@ module CurrencySpy
|
|
29
29
|
# The hour of the rate
|
30
30
|
def rate_time
|
31
31
|
regexp = Regexp.new(currency_code)
|
32
|
-
time_regexp = Regexp.new(/\d+:\d+/)
|
33
32
|
res = nil
|
34
|
-
page.search("//
|
33
|
+
page.search("//span[@name='pair']").each do |td|
|
35
34
|
if (regexp.match(td.content))
|
36
35
|
hour = td.next_element.next_element.content
|
37
36
|
res = DateTime.parse(hour)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Lukasz Badura
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-03-26 23:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|