treasury_bond_yield 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -6
- data/lib/treasury_bond.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,26 +1,30 @@
|
|
1
|
-
= Treasury
|
1
|
+
= Treasury Bond Yield
|
2
2
|
|
3
|
-
Treasury
|
3
|
+
Treasury Bond Yield is a Ruby utility to pull US treasury bond yields from http://www.treas.gov website.
|
4
4
|
It provides the latest yields for 1 month, 1 year, 5 year, 10 year, 20 year and 30 year treasury bonds.
|
5
5
|
|
6
|
+
== INSTALL
|
7
|
+
|
8
|
+
gem install treasury_bond_yield
|
9
|
+
|
6
10
|
== DEPENDENCIES
|
7
11
|
|
8
12
|
* Net::HTTP
|
9
13
|
* xml-simple
|
10
14
|
|
11
15
|
== USAGE
|
12
|
-
|
13
|
-
require 'treasury_bond
|
16
|
+
require 'rubygems'
|
17
|
+
require 'treasury_bond'
|
14
18
|
|
15
19
|
To show the 10 year Treasury Bond yield:
|
16
20
|
|
17
21
|
TreasuryBond.yield[:ten_year]
|
18
22
|
|
19
|
-
..20 year:
|
23
|
+
..and the 20 year Treasury Bond yield:
|
20
24
|
|
21
25
|
TreasuryBond.yield[:twenty_year]
|
22
26
|
|
23
|
-
To show the date
|
27
|
+
To show the date for the yield:
|
24
28
|
|
25
29
|
TreasuryBond.yield[:date]
|
26
30
|
|
data/lib/treasury_bond.rb
CHANGED
@@ -39,6 +39,6 @@ class TreasuryBond
|
|
39
39
|
Net::HTTP.get_response(URI.parse(url)).body
|
40
40
|
end
|
41
41
|
def url
|
42
|
-
"http://www.
|
42
|
+
"http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Datasets/yield.xml"
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: treasury_bond_yield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 2
|
9
|
+
version: "0.2"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Craig Davidson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-06 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|