module Stocks
Provides an interface to do real-time analysis of stocks.
- Author
-
Matt Fornaciari (mattforni@gmail.com)
- License
-
MIT
- Author
-
Matt Fornaciari (mattforni@gmail.com)
- License
-
MIT
Public Class Methods
exists!(symbol)
click to toggle source
exists?(symbol)
click to toggle source
Determines whether or not the provided symbol exists.
Args¶ ↑
-
symbol
The symbol to evaluate for existence
Returns¶ ↑
Whether or not the provided symbol exists
# File lib/stocks.rb, line 24 def self.exists?(symbol) symbol.upcase! EXISTS_CACHE.fetch(symbol) { !Quote.get(symbol)[symbol][:date].nil? } end