Sorting algorithms implementation in Ruby mixin.