diff options
| author | mo khan <mo@mokhan.ca> | 2014-05-22 20:24:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-05-22 20:24:37 -0600 |
| commit | efef78b78c071fca55f5280fd7e04f6f3a26a7ee (patch) | |
| tree | 08e583be848247c54ccfd0e7015b6ec65be47fae | |
| parent | 7dabcb337648a7bbd564940f2cb6d4fff89f8882 (diff) | |
remove puts and inline variables.
| -rw-r--r-- | lib/employee.rb | 6 | ||||
| -rw-r--r-- | lib/unit.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/employee.rb b/lib/employee.rb index b29c5be..794fc62 100644 --- a/lib/employee.rb +++ b/lib/employee.rb @@ -38,13 +38,9 @@ class Grant def vest_at(price, portion) number_of_units_to_vest = portion.to_f * @units.count - units_to_vest = @units.take(number_of_units_to_vest) - units_to_vest.each do |unit| + @units.take(number_of_units_to_vest).each do |unit| unit.vest_at(price) end - puts unvested_units.count - puts vested_units.count - puts @units.count end private diff --git a/lib/unit.rb b/lib/unit.rb index 0761c8e..efd73cb 100644 --- a/lib/unit.rb +++ b/lib/unit.rb @@ -1,4 +1,8 @@ class Unit + def initialize + @vested = false + end + def *(price) price end |
