Class: Commission
- Inherits:
-
Object
- Object
- Commission
- Includes:
- ArgumentProcessor
- Defined in:
- lib/commission.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Free, OptionsHouse, OptionsHouseAlt
Instance Attribute Summary collapse
-
#contracts ⇒ Object
Returns the value of attribute contracts.
-
#shares ⇒ Object
Returns the value of attribute shares.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Commission
constructor
A new instance of Commission.
Methods included from ArgumentProcessor
Constructor Details
#initialize(args = {}) ⇒ Commission
Returns a new instance of Commission.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/commission.rb', line 6 def initialize(args = {}) if instance_of? Commission raise ArgumentError, "Commission cannot be instantiated" end process_args(args) @shares ||= 0 @contracts ||= 0 end |
Instance Attribute Details
#contracts ⇒ Object
Returns the value of attribute contracts.
4 5 6 |
# File 'lib/commission.rb', line 4 def contracts @contracts end |
#shares ⇒ Object
Returns the value of attribute shares.
4 5 6 |
# File 'lib/commission.rb', line 4 def shares @shares end |