Sha256: 9d356d0ba6c5010491c1596df28fd16a25e3114cff1f4f3b0ed72f8455d03daa

Contents?: true

Size: 295 Bytes

Versions: 1

Compression:

Stored size: 295 Bytes

Contents

class StockIndex

  def initialize(symbol)
    @symbol = symbol
  end

  def components
    case @symbol
      when '^DJI'
        DjiScraper.new.scrape
      when '^GSPC'
        SP500Scraper.new.scrape
      when '^NDX'
        NasdaqScraper.new.scrape
      else
        []
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stock_index-0.6.0 lib/stock_index/stock_index.rb