Class: Alpaca::Trade::Api::LastTrade
- Inherits:
-
Object
- Object
- Alpaca::Trade::Api::LastTrade
- Defined in:
- lib/alpaca/trade/api/last_trade.rb
Instance Attribute Summary collapse
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
-
#initialize(json) ⇒ LastTrade
constructor
A new instance of LastTrade.
Constructor Details
#initialize(json) ⇒ LastTrade
Returns a new instance of LastTrade.
7 8 9 10 11 |
# File 'lib/alpaca/trade/api/last_trade.rb', line 7 def initialize(json) @status = json['status'] @symbol = json['symbol'] @last = json['last'] end |
Instance Attribute Details
#last ⇒ Object (readonly)
Returns the value of attribute last.
5 6 7 |
# File 'lib/alpaca/trade/api/last_trade.rb', line 5 def last @last end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/alpaca/trade/api/last_trade.rb', line 5 def status @status end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
5 6 7 |
# File 'lib/alpaca/trade/api/last_trade.rb', line 5 def symbol @symbol end |