Class: IB::Messages::Incoming::AbstractTick
- Inherits:
-
AbstractMessage
- Object
- AbstractMessage
- AbstractMessage
- IB::Messages::Incoming::AbstractTick
- Defined in:
- lib/ib/messages/incoming/ticks.rb
Instance Attribute Summary
Attributes inherited from AbstractMessage
Attributes inherited from AbstractMessage
Instance Method Summary collapse
- #to_human ⇒ Object
-
#type ⇒ Object
Returns Symbol with a meaningful name for received tick type.
Methods inherited from AbstractMessage
#check_version, #initialize, #load, #load_map, #version
Methods inherited from AbstractMessage
data_map, message_id, #message_id, message_type, #message_type, version
Constructor Details
This class inherits a constructor from IB::Messages::Incoming::AbstractMessage
Instance Method Details
#to_human ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ib/messages/incoming/ticks.rb', line 12 def to_human "<#{self.} #{type}:" + @data.map do |key, value| " #{key} #{value}" unless [:version, :ticker_id, :tick_type].include?(key) end.compact.join(',') + " >" end |
#type ⇒ Object
Returns Symbol with a meaningful name for received tick type
8 9 10 |
# File 'lib/ib/messages/incoming/ticks.rb', line 8 def type TICK_TYPES[@data[:tick_type]] end |