How to create a new time instance in Ruby?
Answer / Rakesh Chandra
"To create a new Time instance in Ruby, you can use the Time.new method or Time.at method.nnTime.new creates a new instance of Time with the current date and time, while Time.at takes a Unix timestamp as an argument."
| Is This Answer Correct ? | 0 Yes | 0 No |
How do the following methods differ: @my_string.strip and @my_string.strip! ?
Please explain the three levels of access control for ruby methods?
Explain retry statement in ruby.
Ruby support single inheritance/multiple inheritance or both?
Describe the environment variables present in Ruby?
Which ruby interpreter option enables debugging?
Tell me how would you freeze an object in ruby? Can you provide a simple example?
Explain about the command line options?
What is the difference between a statement and an expression in ruby?
Explain me what the difference is between false and nil in ruby?
what is class libraries in Ruby?
Explain raise statement in Ruby?