title: How to save time when user(for example) write in ruby?
body: <p>i am making a program for a baby and the logic of the program is like this:
  What do you want to do?
  1) Learn a word to Baby.
  2)Show how many words Baby have learn.
  3)Show the time when Baby has learn words.</p>
  
  <p>If i click 3, then it will run like this:
  Words that you have learn to me are:</p>
  
  <pre><code>Hey[4 April, 2018, 2:35PM]
  Go[4 April, 2018, 2:35PM]
  </code></pre>
  
  <p>I tried with this(i don't really know what i did), but didn't work:</p>
  
  <pre><code>if action == "5"
  time = Time.now
  time.strftime("%d %B %Y %H")
  puts "Words that i have learn till now(with time) are:" 
  puts words + time
  end 
  </code></pre>
  
  <p>Words it's an array.</p>
  
  <p>The code when baby learns word:</p>
  
  <p><code>if action == "1" &amp;&amp; learnedwords.length &lt;= 6 &amp;&amp; learnedwords.scan(/\d+/).empty? &amp;&amp; learnedwords.scan(/[!@#%^&amp;*()_+{}[]:;'"\/\\?&gt;&lt;.,]/).empty? 
  fjalet.push(learnedwords)
  puts "System:Word Fjala \"#{learnedwords}\" is now in baby's memory."</code> ` </p>