Class: Tradier::History
Instance Attribute Summary collapse
-
#close ⇒ Object
readonly
Returns the value of attribute close.
-
#high ⇒ Object
readonly
Returns the value of attribute high.
-
#low ⇒ Object
readonly
Returns the value of attribute low.
-
#open ⇒ Object
readonly
Returns the value of attribute open.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, #initialize, #update
Constructor Details
This class inherits a constructor from Tradier::Base
Instance Attribute Details
#close ⇒ Object (readonly)
Returns the value of attribute close.
7 8 9 |
# File 'lib/tradier/history.rb', line 7 def close @close end |
#high ⇒ Object (readonly)
Returns the value of attribute high.
7 8 9 |
# File 'lib/tradier/history.rb', line 7 def high @high end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
7 8 9 |
# File 'lib/tradier/history.rb', line 7 def low @low end |
#open ⇒ Object (readonly)
Returns the value of attribute open.
7 8 9 |
# File 'lib/tradier/history.rb', line 7 def open @open end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
7 8 9 |
# File 'lib/tradier/history.rb', line 7 def volume @volume end |
Class Method Details
.from_response(body = {}) ⇒ Object
15 16 17 |
# File 'lib/tradier/history.rb', line 15 def self.from_response(body={}) new(body) end |
Instance Method Details
#date ⇒ Object
9 10 11 12 13 |
# File 'lib/tradier/history.rb', line 9 def date return unless @date || @attrs[:date] @date ||= Date.parse(@attrs[:date]) end |