Class: StockTracker::MockPastQuote

Inherits:
Object
  • Object
show all
Defined in:
lib/stocktracker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol, date) ⇒ MockPastQuote

Returns a new instance of MockPastQuote.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/stocktracker.rb', line 110

def initialize(symbol, date)
  self.symbol = symbol
  self.date = date
  self.results =
    {
      :date=>"2011-12-20",
      :open=>628.0,
      :high=>631.84,
      :low=>627.99,
      :close=>630.37,
      :volume=>2388200.0,
      :adj_close=>630.37
    }
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



109
110
111
# File 'lib/stocktracker.rb', line 109

def date
  @date
end

#resultsObject

Returns the value of attribute results.



109
110
111
# File 'lib/stocktracker.rb', line 109

def results
  @results
end

#symbolObject

Returns the value of attribute symbol.



109
110
111
# File 'lib/stocktracker.rb', line 109

def symbol
  @symbol
end