implement megamodel with folder check for ruby