Files
developer-roadmap/roadmaps/ruby/content/instance-variables@dbdllih50mNFBrP9huQz9.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

9 lines
859 B
Markdown

# Instance Variables
Instance variables in Ruby are variables that hold data specific to an object. They are defined within a class but belong to individual instances (objects) of that class. You create an instance variable by prefixing a variable name with an `@` symbol (e.g., `@name`). Each object of the class will have its own copy of these variables, allowing you to store different values for each object's attributes.
Visit the following resources to learn more:
- [@article@Read This If You Want to Understand Instance Variables in Ruby](https://www.rubyguides.com/2019/07/ruby-instance-variables/)
- [@article@Understanding Ruby Objects and Instance Variables](https://dev.to/bhumi/understanding-ruby-objects-and-instance-variables-4157)
- [@video@Instances and Instance Variables in Ruby Programming](https://www.youtube.com/watch?v=H27i3WuAEVI)