yahoo_finanza 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yahoo_finanza.rb +7 -0
- data/lib/yahoo_finanza/constants.rb +8 -24
- data/lib/yahoo_finanza/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3893047d95805f00d8c58e8918ac9c50a6e6380
|
4
|
+
data.tar.gz: 6fea6aaeca86549b9a0d6ce3d4f9845569192893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e633ffe84de6f9c970433ebcda6000a5e307a973162bda15625b3c6af37b2d86ac9fe1498a575dbcee8012b143db417f61171ac7f1bf0ef764e9f3ece3ee6d1
|
7
|
+
data.tar.gz: c328bb4541a334da2fbbe508de05562fa08d79627f7edc6e9113949701b9b409b7fb6862e220018ab77ec01a2a95eeaf9a6543b997e9ce54057012e1730f57be
|
data/lib/yahoo_finanza.rb
CHANGED
@@ -4,32 +4,16 @@ module YahooFinanza
|
|
4
4
|
module Constants
|
5
5
|
extend self
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
%w(nyse amex nasdaq sp_500).each do |market|
|
8
|
+
define_method(market) do
|
9
|
+
YAML.load(File.read(File.join(YahooFinanza.config_path, "#{market}.yml")))["#{market}_symbols"]
|
10
|
+
end
|
9
11
|
end
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def nasdaq
|
16
|
-
YAML.load(File.read(File.join(Dir.pwd, "config/nasdaq.yml")))["nasdaq_symbols"]
|
17
|
-
end
|
18
|
-
|
19
|
-
def sp_500
|
20
|
-
YAML.load(File.read(File.join(Dir.pwd, "config/sp_500.yml")))["sp_500_symbols"]
|
21
|
-
end
|
22
|
-
|
23
|
-
def active_nyse_url
|
24
|
-
YAML.load(File.read(File.join(Dir.pwd, "config/config.yml")))["active_nyse_url"]
|
25
|
-
end
|
26
|
-
|
27
|
-
def active_nnm_url
|
28
|
-
YAML.load(File.read(File.join(Dir.pwd, "config/config.yml")))["active_nnm_url"]
|
29
|
-
end
|
30
|
-
|
31
|
-
def search_url
|
32
|
-
YAML.load(File.read(File.join(Dir.pwd, "config/config.yml")))["search_url"]
|
13
|
+
%w(active_nyse_url active_nnm_url search_url).each do |url|
|
14
|
+
define_method(url) do
|
15
|
+
YAML.load(File.read(File.join(YahooFinanza.config_path, "config.yml")))["#{url}"]
|
16
|
+
end
|
33
17
|
end
|
34
18
|
end
|
35
19
|
end
|