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
- #the_data ⇒ Object
- #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, #simple_load, #valid?, #version
Methods inherited from AbstractMessage
data_map, message_id, #message_id, message_type, #message_type, properties?, #request_id, version
Constructor Details
This class inherits a constructor from IB::Messages::Incoming::AbstractMessage
Instance Method Details
#the_data ⇒ Object
19 20 21 |
# File 'lib/ib/messages/incoming/ticks.rb', line 19 def the_data @data.reject{|k,_| [:version, :ticker_id].include? k } end |
#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 |