lib/ib-ruby/models/contract.rb in ib-ruby-0.7.10 vs lib/ib-ruby/models/contract.rb in ib-ruby-0.7.11
- old
+ new
@@ -64,20 +64,22 @@
attr_accessor :description # NB: local to ib-ruby, not part of TWS.
### Associations
- has_one :contract_detail
+ has_many :orders # Placed for this Contract
- has_one :underlying # for Delta-Neutral Combo contracts only!
- alias under_comp underlying
- alias under_comp= underlying=
+ has_one :contract_detail # Volatile info about this Contract
- has_many :combo_legs
+ has_many :combo_legs # for Combo/BAG Contracts only
alias legs combo_legs
alias legs= combo_legs=
alias combo_legs_description legs_description
alias combo_legs_description= legs_description=
+
+ has_one :underlying # for Delta-Neutral Combo Contracts only
+ alias under_comp underlying
+ alias under_comp= underlying=
### Extra validations
validates_inclusion_of :sec_type, :in => CODES[:sec_type].keys,
:message => "should be valid security type"