Class: Alpaca::Trade::Api::Clock

Inherits:
Object
  • Object
show all
Defined in:
lib/alpaca/trade/api/clock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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)
  @timestamp = json['timestamp']
  @is_open = json['is_open']
  @next_open = json['next_open']
  @next_close = json['next_close']
end

Instance Attribute Details

#is_openObject (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_closeObject (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_openObject (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

#timestampObject (readonly)

Returns the value of attribute timestamp.



7
8
9
# File 'lib/alpaca/trade/api/clock.rb', line 7

def timestamp
  @timestamp
end