Class: Alpaca::Trade::Api::Clock
- Inherits:
-
Object
- Object
- Alpaca::Trade::Api::Clock
- Defined in:
- lib/alpaca/trade/api/clock.rb
Instance Attribute Summary collapse
-
#is_open ⇒ Object
readonly
Returns the value of attribute is_open.
-
#next_close ⇒ Object
readonly
Returns the value of attribute next_close.
-
#next_open ⇒ Object
readonly
Returns the value of attribute next_open.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(json) ⇒ Clock
constructor
A new instance of Clock.
Constructor Details
#initialize(json) ⇒ Clock
Returns a new instance of Clock.
9 10 11 12 13 14 |
# File 'lib/alpaca/trade/api/clock.rb', line 9 def initialize(json) = json['timestamp'] @is_open = json['is_open'] @next_open = json['next_open'] @next_close = json['next_close'] end |
Instance Attribute Details
#is_open ⇒ Object (readonly)
Returns the value of attribute is_open.
7 8 9 |
# File 'lib/alpaca/trade/api/clock.rb', line 7 def is_open @is_open end |
#next_close ⇒ Object (readonly)
Returns the value of attribute next_close.
7 8 9 |
# File 'lib/alpaca/trade/api/clock.rb', line 7 def next_close @next_close end |
#next_open ⇒ Object (readonly)
Returns the value of attribute next_open.
7 8 9 |
# File 'lib/alpaca/trade/api/clock.rb', line 7 def next_open @next_open end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
7 8 9 |
# File 'lib/alpaca/trade/api/clock.rb', line 7 def end |