Module: YhyTestGems::MyHelper

Defined in:
lib/yhy_test_gems/helper.rb

Instance Method Summary collapse

Instance Method Details

#my_helperObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/yhy_test_gems/helper.rb', line 3

def my_helper
  time = DateTime.parse(Time.now.to_s).strftime('%H:%M:%S').to_s
  date = DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d').to_s
  html =  []
  html << '<div id="mydiv">'
  html << '<div id="time">' + time + '</div>'
  html << '<div id="date">' + date + '</div>'
  html << '</div>'
  raw html.join("\n")
end