Class: IB::IncomingMessages::Error
Instance Attribute Summary
#data
#created_at
Class Method Summary
collapse
Instance Method Summary
collapse
inherited, #initialize
Class Method Details
.message_id ⇒ Object
1002
1003
1004
|
# File 'lib/ib-ruby/messages.rb', line 1002
def self.message_id
4
end
|
Instance Method Details
#code ⇒ Object
1006
1007
1008
|
# File 'lib/ib-ruby/messages.rb', line 1006
def code
@data && @data[:code]
end
|
#load ⇒ Object
1010
1011
1012
1013
1014
1015
1016
1017
1018
|
# File 'lib/ib-ruby/messages.rb', line 1010
def load
@data[:version] = @socket.read_int
if @data[:version] < 2
@data[:message] = @socket.read_string
else
autoload([:id, :int], [:code, :int], [:message, :string])
end
end
|
#to_human ⇒ Object
1020
1021
1022
|
# File 'lib/ib-ruby/messages.rb', line 1020
def to_human
"TWS #{@data[:code]}: #{@data[:message]}"
end
|