M
Q. Which of the method is used to returns the contents of the file line by line?
One of the IO class methods is IO.readlines. This method returns the contents of the file line by line.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. What is the purpose of the ensure keyword in Ruby exception handling?
Q. What does the strftime method do in Ruby when applied to a Time object?
Q. What is the extension used for saving the ruby file?
Q. Which keyword is used to define a private method in a Ruby class?
Q. What is the main purpose of using inheritance in Ruby?
Q. What is the purpose of the with_index method in Ruby enumerators?
Q. What will be the output of the given code?
Q. What does the advance method do for a Date object in Ruby?
Q. What is the output of the following? "Iam learning ruby language".length
Q. We use semicolon or parentheses after every print or puts statement.
Discusssion
Login to discuss.