adspace
how you define Instance Variable, Global Variable and Class Variable in Ruby?
Answer Posted / Omendra Singh
Instance variables are defined using the @ symbol (for example: @instance_variable). Global variables are defined using the $ symbol (for example: $global_variable). Class variables are defined using the @@ symbol (for example: @@class_variable)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers