Sha256: e2b5bc648f4857cc03023e8794e410d76388d87b3f7f33f121d8a3d9e6461169
Contents?: true
Size: 411 Bytes
Versions: 5
Compression:
Stored size: 411 Bytes
Contents
class StockIndex class BsymSearch require 'csv' class << self 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 def files(pricing_source) File.expand_path("../../bsym/#{pricing_source.upcase}.csv", File.dirname(__FILE__)) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems