Module: Quotr

Defined in:
lib/quotr.rb,
lib/quotr/yahoo.rb,
lib/quotr/version.rb,
lib/quotr/yahoo_parser.rb

Defined Under Namespace

Classes: Error, Yahoo, YahooParser

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.close(symbol, date = Date.today) ⇒ Object



7
8
9
10
# File 'lib/quotr.rb', line 7

def self.close(symbol, date=Date.today)
  results = YahooParser.parse(Yahoo.fetch(symbol, date))
  results[date.to_date] || results.values.first
end