Update index.rb

Added the comment method