Method: Yfinrb::Tickers#initialize

Defined in:
lib/yfinrb/tickers.rb

#initialize(tickers, session = nil) ⇒ Tickers

Returns a new instance of Tickers.



3
4
5
6
7
8
9
# File 'lib/yfinrb/tickers.rb', line 3

def initialize(tickers, session = nil)
  tickers = tickers.is_a?(Array) ? tickers : tickers.split(',')
  @symbols = tickers.map(&:upcase)
  @tickers = @symbols.each_with_object({}) do |ticker, hash|
    hash[ticker] = Ticker.new(ticker, session: session)
  end
end