Broke example out into a core Ruby class and standard libs for emulating HL.