Class: StockTracker::MockPastQuote
- Inherits:
-
Object
- Object
- StockTracker::MockPastQuote
- Defined in:
- lib/stocktracker.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#results ⇒ Object
Returns the value of attribute results.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
Instance Method Summary collapse
-
#initialize(symbol, date) ⇒ MockPastQuote
constructor
A new instance of MockPastQuote.
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
#date ⇒ Object
Returns the value of attribute date.
109 110 111 |
# File 'lib/stocktracker.rb', line 109 def date @date end |
#results ⇒ Object
Returns the value of attribute results.
109 110 111 |
# File 'lib/stocktracker.rb', line 109 def results @results end |
#symbol ⇒ Object
Returns the value of attribute symbol.
109 110 111 |
# File 'lib/stocktracker.rb', line 109 def symbol @symbol end |