class Methods class << self # get version like ubuntu version # eg 13.10 def get_version m = Time.now.to_s.match /(\d+)-(\d+)-(\d+)/ year, month, day = m[1], m[2], m[3] year.gsub! '20', '' "#{year}#{month}#{day}" end def change_current_version Find.find(Dir.pwd).each do |path| path.match Regexp "/version.rb" File.read end end end end