class StockIndex::BsymSearch
Public Class Methods
files(pricing_source)
click to toggle source
# File lib/stock_index/bsym_search.rb, line 15 def files(pricing_source) File.expand_path("../../bsym/#{pricing_source.upcase}.csv", File.dirname(__FILE__)) end
find(symbol, pricing_source)
click to toggle source
# File lib/stock_index/bsym_search.rb, line 9 def find(symbol, pricing_source) CSV.foreach(files(pricing_source)) do |row| return {name: row[1], bbgid: row[2]} if row[0] == symbol end end