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


Please Help Members By Posting Answers For Below Questions

What is the current version of ruby on rails?

948