Class | IB::OutgoingMessages::AbstractMessage |
In: |
messages.rb
|
Parent: | Object |
# File messages.rb, line 39 39: def self.message_id 40: raise Exception("AbstractMessage.message_id called - you need to override this in a subclass.") 41: end
data is a Hash.
# File messages.rb, line 44 44: def initialize(data=nil) 45: @data = StringentHash.new(data) 46: end
This causes the message to send itself over the server socket in server[:socket]. "server" is the @server instance variable from the IB object. You can also use this to e.g. get the server version number.
# File messages.rb, line 51 51: def send(server) 52: raise Exception("AbstractMessage.send called - you need to override this in a subclass.") 53: end
Returns EOL instead of datum if datum is nil, providing the same functionality as sendMax() in the Java version, which uses Double.MAX_VALUE to mean "item not set" in a variable, and replaces that with EOL on send.
# File messages.rb, line 64 64: def nilFilter(datum) 65: datum.nil? ? EOL : datum 66: end