Codes in Ruby Lanugage