Sign up or Sign in | Share
 
ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby basics (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby basics
#4385
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
Ruby Global Variables


Global variables begin with $. Uninitialized global variables have the value nil and produce warnings with the -w option.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4386
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
Assignment to global variables alters global status. It is not recommended to use global variables. They make programs cryptic.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4387
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
In Ruby we can access value of any variable or constant by putting a hash (#) character just before that variable or constant
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4388
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
Ruby Instance Variables


Instance variables begin with @. Uninitialized instance variables have the value nil and produce warnings with the -w option
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4389
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
Ruby Class Variables:

Class variables begin with @@ and must be initialized before they can be used in method definitions
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4390
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 10 Months ago Karma: 0  
Referencing an uninitialized class variable produces an error.

Class variables are shared among descendants of the class or module in which the class variables are defined.

Overriding class variables produce warnings with the -w option
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved