Interchangeable components in Ruby