Every image can draw itself. See
http://www.libgosu.org/rdoc/Gosu/Image.html#draw-instance_methodThe code there probably set @tileset to a list of Images. Image.load_tiles is a list and has no draw function, but each element in it (accessed by @tileset[tile]) does.
So his code says:
For each map position:
..get tilecode at this position
....if tilecode is not nil (if there is a tile at this space)
......get image for tile code
......tell image to draw at geometric position (map_x*50-5, map_y*50-5)