Please read this on how to post code.
Please use proper Ruby 2 space indentation.
Also, do not use $ global variables ! (Use module or class variables instead.) See:
Please read this on how to post code.
Please use proper Ruby 2 space indentation.
Also, do not use $ global variables ! (Use module or class variables instead.) See: