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
#4589
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  
Operator Overloading

We'd like the + operator to perform vector addition of two Point objects, the * operator to multiply a Point by a scalar, and the unary . operator to do the equivalent of multiplying by .1.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4590
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  
Array and Hash Access with [ ]

Ruby uses square brackets for array and hash access, and allows any class to define a [] method andrray and Hash Access with [ ]

Ruby uses square brackets for array and hash access, and allows any class to define a rray and Hash Access with [ ]

Ruby uses square brackets for array and hash access, and allows any class to define a [] method andrray and Hash Access with [ ]

Ruby uses square brackets for array and hash access, and allows any class to define a [] method and use these brackets itself
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4591
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 Constants


Many classes can benefit from the definition of some associated constants
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4592
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  
Inside the class definition, these constants can be referred to by their unqualified names.

Outside the definition, they must be prefixed by the name of the class, of course
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4593
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  
Class variables are visible to, and shared by, the class methods and the instance methods of a class, and also by the class definition itself.

Class variables have names that begin with @@.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4594
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  
Public, Protected, Private Methods


Instance methods may be public, private, or protected.
 
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