The time.to_a
attribute returns an array which contains ten elements when called on an object. Each element represents values for the particular time attribute.
It returns the values:
timeObj.to_a
This attribute returns an array of ten-elements that are values of time object timeObject
.
# create time objecttime_object = Time.now # current time# get ten-element valuesputs "#{time_object.to_a}"
Time.now
object. And this one we created is the time as of now or current system time.