Class: IB::IncomingMessages::ScannerData

Inherits:
AbstractMessage show all
Defined in:
lib/ib-ruby/messages.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractMessage

#data

Attributes inherited from ExtremelyAbstractMessage

#created_at

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractMessage

inherited, #initialize

Methods inherited from ExtremelyAbstractMessage

#to_human

Constructor Details

This class inherits a constructor from IB::IncomingMessages::AbstractMessage

Instance Attribute Details

#contract_detailsObject

Returns the value of attribute contract_details.



1412
1413
1414
# File 'lib/ib-ruby/messages.rb', line 1412

def contract_details
  @contract_details
end

Class Method Details

.message_idObject



1413
1414
1415
# File 'lib/ib-ruby/messages.rb', line 1413

def self.message_id
  20
end

Instance Method Details

#loadObject



1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
# File 'lib/ib-ruby/messages.rb', line 1417

def load
  autoload([:version, :int], [:ticker_id, :int], [:number_of_elements, :int])
  @data[:results] = Array.new(@data[:number_of_elements]) { |index|
    {
      :rank => @socket.read_int
      ## TODO: Pick up here.
    }
  }

end