Class: Xtb::Http::TradingHours
- Defined in:
- lib/xtb/http/trading_hours.rb
Overview
Constant Summary collapse
- TimesRecord =
Represents both quotes and trading times records.
Data.define(:day, :from_t, :to_t)
- TradingHoursRecord =
Data.define(:quotes, :symbol, :trading) do def initialize(symbol:, quotes: TimesRecord.new, trading: TimesRecord.new) super(quotes:, symbol:, trading:) end end
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(symbols) ⇒ TradingHours
constructor
A new instance of TradingHours.
Methods inherited from Command
Constructor Details
#initialize(symbols) ⇒ TradingHours
Returns a new instance of TradingHours.
17 18 19 20 21 |
# File 'lib/xtb/http/trading_hours.rb', line 17 def initialize(symbols) @symbols = symbols super() end |
Instance Method Details
#call ⇒ Object
23 24 25 |
# File 'lib/xtb/http/trading_hours.rb', line 23 def call super.return_data.map { |record| TradingHoursRecord.new(**record) } end |