Class IB::Datatypes::ComboLeg
In: datatypes.rb
Parent: Object

Methods

new   new   serialize  

Attributes

action  [RW] 
con_id  [RW] 
exchange  [RW] 
open_close  [RW] 
ratio  [RW] 

Public Class methods

[Source]

     # File datatypes.rb, line 230
230:       def initialize
231:         @con_id = 0
232:         @ratio = 0
233:         @open_close = 0
234:       end

[Source]

     # File datatypes.rb, line 236
236:       def initialize(options_in)
237:         options = StringentHash.new(options_in)
238: 
239:         @con_id = options[:con_id]
240:         @ratio = options[:ratio]
241:         @action = options[:action]
242:         @exchange = options[:exchange]
243:         @open_close = options[:open_close]
244:       end

Public Instance methods

Some messages include open_close, some don’t. wtf.

[Source]

     # File datatypes.rb, line 248
248:       def serialize(include_open_close = false)
249:         self.collect { |leg|
250:           [ leg.con_id, leg.ratio, leg.action, leg.exchange, (include_open_close ? leg.open_close : [] )]
251:         }.flatten
252:       end

[Validate]