how you define Instance Variable, Global Variable and Class Variable in Ruby?



how you define Instance Variable, Global Variable and Class Variable in Ruby?..

Answer / 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

More Ruby on Rails Interview Questions

How will be the future for ruby on rails?

1 Answers  


How you run your Rails Application without creating database ?

1 Answers  


How is dynamic scaffolding different from static scaffolding?

1 Answers  


Explain the role of sub directory app/controllers and app/helpers.

1 Answers  


Is ruby on rails dying?

1 Answers  


At is cross-site request forgery (csrf)?

1 Answers  


Explain me what is the role of rails controller?

1 Answers  


What is rails active record?

1 Answers  


let me know what is ruby software and where and when it is usefull. Is it usefull to data base developer, if yes...where? thank you

1 Answers  


what is the command to create a migration?

1 Answers  


what is the role of Rails Controller?

1 Answers  


Am Fresher ..,i dont know seven controller methods.am searching in google .but am not getting .help me

1 Answers   Baidu,


Categories