Sha256: 4fb152898d5c1706acdfafa9b0187f522237ecf3d15506b5502f01b72c82875d
Contents?: true
Size: 485 Bytes
Versions: 2
Compression:
Stored size: 485 Bytes
Contents
require "yaml" module YahooFinanza module Constants extend self %w(nyse amex nasdaq sp_500).each do |market| define_method(market) do YAML.load(File.read(File.join(YahooFinanza.config_path, "#{market}.yml")))["#{market}_symbols"] end end %w(active_nyse_url active_nnm_url search_url).each do |url| define_method(url) do YAML.load(File.read(File.join(YahooFinanza.config_path, "config.yml")))["#{url}"] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yahoo_finanza-0.4.7 | lib/yahoo_finanza/constants.rb |
yahoo_finanza-0.4.6 | lib/yahoo_finanza/constants.rb |