Answer Posted / Nitesh Kumar Singh
Methods in Ruby are functions that perform specific tasks. They can be defined within classes, modules, or the main program using the 'def' and 'end' keywords (e.g., def my_method; end). Methods can take arguments, return values, and manipulate object state. Some methods are predefined in Ruby's core library.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers