class StockIndex
Constants
- INDICES
- VERSION
Public Class Methods
new(symbol)
click to toggle source
# File lib/stock_index/stock_index.rb, line 3 def initialize(symbol) @symbol = symbol end
Public Instance Methods
components()
click to toggle source
# File lib/stock_index/stock_index.rb, line 7 def components case @symbol when '^DJI' DjiScraper.new.scrape when '^GSPC' SP500Scraper.new.scrape when '^NDX' NasdaqScraper.new.scrape when '^N225' NikkeiScraper.new.scrape when '^FTSE' FtseScraper.new.scrape else [] end end