Added Ruby examples for examples 1 and 2