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
#4367
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  
An object-oriented program involves classes and objects.

A class is the blueprint from which individual objects are created. In object-oriented terms
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4368
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  
An object-oriented program involves classes and objects. A class is the blueprint from which individual objects are created
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4369
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  
Defining a Class in Ruby:

To implement object-oriented programming by using Ruby, we need to first learn how to create objects and classes in Ruby.

A class in Ruby always starts with the keyword class followed by the name of the class.

The name should always be in initial capitals.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4370
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  
We terminate a class by using the keyword end. All the data members in the class are between the class definition and the end keyword.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4371
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  
Variables in a Ruby Class

Ruby provides four types of variables:

Local Variables

Instance Variables

Class Variables

Global Variable
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4372
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  
Local Variables:

Local variables are the variables that are defined in a method.

Local variables are not available outside the method.

Local variables begin with a lowercase letter or _.
 
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