Class: IbRubyProxy::Client::Ib::ComboLeg

Inherits:
Struct
  • Object
show all
Defined in:
lib/ib_ruby_proxy/client/ib/combo_leg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conid: 0, ratio: 0, action: nil, exchange: nil, open_close: 0, short_sale_slot: 0, designated_location: nil, exempt_code: 0) ⇒ ComboLeg

Returns a new instance of ComboLeg.



9
10
11
12
13
14
15
16
17
18
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 9

def initialize(conid: 0, ratio: 0, action: nil, exchange: nil, open_close: 0, short_sale_slot: 0, designated_location: nil, exempt_code: 0)
  self.conid = conid
  self.ratio = ratio
  self.action = action
  self.exchange = exchange
  self.open_close = open_close
  self.short_sale_slot = short_sale_slot
  self.designated_location = designated_location
  self.exempt_code = exempt_code
end

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def action
  @action
end

#conidObject

Returns the value of attribute conid

Returns:

  • (Object)

    the current value of conid



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def conid
  @conid
end

#designated_locationObject

Returns the value of attribute designated_location

Returns:

  • (Object)

    the current value of designated_location



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def designated_location
  @designated_location
end

#exchangeObject

Returns the value of attribute exchange

Returns:

  • (Object)

    the current value of exchange



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def exchange
  @exchange
end

#exempt_codeObject

Returns the value of attribute exempt_code

Returns:

  • (Object)

    the current value of exempt_code



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def exempt_code
  @exempt_code
end

#open_closeObject

Returns the value of attribute open_close

Returns:

  • (Object)

    the current value of open_close



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def open_close
  @open_close
end

#ratioObject

Returns the value of attribute ratio

Returns:

  • (Object)

    the current value of ratio



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def ratio
  @ratio
end

#short_sale_slotObject

Returns the value of attribute short_sale_slot

Returns:

  • (Object)

    the current value of short_sale_slot



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 8

def short_sale_slot
  @short_sale_slot
end

Instance Method Details

#to_ibObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ib_ruby_proxy/client/ib/combo_leg.rb', line 20

def to_ib
  ib_object = Java::ComIbClient::ComboLeg.new
  ib_object.conid(conid).to_java
  ib_object.ratio(ratio).to_java
  ib_object.action(action).to_java
  ib_object.exchange(exchange).to_java
  ib_object.openClose(open_close).to_java
  ib_object.shortSaleSlot(short_sale_slot).to_java
  ib_object.designatedLocation(designated_location).to_java
  ib_object.exemptCode(exempt_code).to_java

  ib_object
end