Class: IB::Underlying
- Includes:
- BaseProperties
- Defined in:
- lib/models/ib/underlying.rb
Overview
Calculated characteristics of underlying Contract (volatile)
Instance Method Summary collapse
-
#==(other) ⇒ Object
Comparison.
- #default_attributes ⇒ Object
-
#serialize ⇒ Object
Serialize under_comp parameters.
Methods included from BaseProperties
#content_attributes, #set_attribute_defaults, #to_human, #update_missing
Instance Method Details
#==(other) ⇒ Object
Comparison
25 26 27 28 29 |
# File 'lib/models/ib/underlying.rb', line 25 def == other super(other) || other.is_a?(self.class) && con_id == other.con_id && delta == other.delta && price == other.price end |
#default_attributes ⇒ Object
15 16 17 |
# File 'lib/models/ib/underlying.rb', line 15 def default_attributes super.merge :con_id => 0 end |
#serialize ⇒ Object
Serialize under_comp parameters
20 21 22 |
# File 'lib/models/ib/underlying.rb', line 20 def serialize [true, con_id, delta, price] end |