Lsnorc implemented in ruby