Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 13, 2016 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4337ced3fd58c54c0f0a4d82f183e798 to your computer and use it in GitHub Desktop.
Save anonymous/4337ced3fd58c54c0f0a4d82f183e798 to your computer and use it in GitHub Desktop.
class Tickers
attr_accessor :ticker_names
def initialize
@ticker_url = "ticker_list.txt"
@ticker_names = []
end
def load_tickers
File.open(ticker_url,'r') do |f1|
while line = f1.gets
@ticker_names << line
end
end
end
end
t = Tickers.new
t.ticker_names.foreach do |tick|
puts tick
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment