What is a symbol in ruby?
Answer / Arun Kumar Yadav
A Symbol in Ruby is an object that represents an identifier (a string that starts with a colon and contains only alphanumeric characters, underscores, or colons). They are used as keys in hashes and for method names.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain how Symbol is different from variables?
How would you create getter and setter methods in ruby?
What are the data types in ruby?
Explain about ruby code blocks?
In Ruby code, often it is observed that coder uses a short hand form of using an expression like array.map(&:method_name) instead of array.map { |element| element.method_name }. How this trick actually works?
What is the difference between “#==” and “#equal?”
What is mvc and why do we use it?
Explain some differences between ruby and python.
Write the command to get installed Ruby version in your system?
Explain about normal method class?
How is class methods defined in ruby?
What is the difference between a statement and an expression in ruby?