Class: IbRubyProxy::Client::Ib::DeltaNeutralContract
- Inherits:
-
Struct
- Object
- Struct
- IbRubyProxy::Client::Ib::DeltaNeutralContract
- Defined in:
- lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb
Instance Attribute Summary collapse
-
#conid ⇒ Object
Returns the value of attribute conid.
-
#delta ⇒ Object
Returns the value of attribute delta.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(conid: 0, delta: 0, price: 0) ⇒ DeltaNeutralContract
constructor
A new instance of DeltaNeutralContract.
- #to_ib ⇒ Object
Constructor Details
#initialize(conid: 0, delta: 0, price: 0) ⇒ DeltaNeutralContract
Returns a new instance of DeltaNeutralContract.
9 10 11 12 13 |
# File 'lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb', line 9 def initialize(conid: 0, delta: 0, price: 0) self.conid = conid self.delta = delta self.price = price end |
Instance Attribute Details
#conid ⇒ Object
Returns the value of attribute conid
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb', line 8 def conid @conid end |
#delta ⇒ Object
Returns the value of attribute delta
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb', line 8 def delta @delta end |
#price ⇒ Object
Returns the value of attribute price
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb', line 8 def price @price end |
Instance Method Details
#to_ib ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/ib_ruby_proxy/client/ib/delta_neutral_contract.rb', line 15 def to_ib ib_object = Java::ComIbClient::DeltaNeutralContract.new ib_object.conid(conid).to_java ib_object.delta(delta).to_java ib_object.price(price).to_java ib_object end |