austinbv / dino

Dino is a ruby gem that helps you bootstrap prototyping with an Arduino
MIT License
388 stars 84 forks source link

Subclass of BaseComponent use #after_initialize #2

Closed burtlo closed 11 years ago

burtlo commented 11 years ago

A large number of the sub-components were using initialize and then calling super. For all the current instances none required any different functionality than the provided initialize so it felt like a safer pattern to have the BaseComponent#initialize to call #after_initialize after it was done ensuring all the base requirements were set up.

While no sub-component used the options, I chose to preserve that they are passed along.

I think this help future components from having to call super and possibly forgetting to call super.