Add Ruby implementation