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
#4397
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, 11 Months ago Karma: 0  
Ruby Pseudo-Variables:

They are special variables that have the appearance of local variables but behave like constants. You can not assign any value to these variables.

self: The receiver object of the current method.

true: Value representing true.

false: Value representing false.

nil: Value representing undefined.

__FILE__: The name of the current source file.

__LINE__: The current line number in the source file.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4398
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, 11 Months ago Karma: 0  
Ruby Basic Literals

The rules Ruby uses for literals are simple and intuitive
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4399
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, 11 Months ago Karma: 0  
Integer Numbers


Ruby supports integer numbers. An integer number can range from -230 to 230-1 or -262 to 262-1.

Integers with-in this range are objects of class Fixnum and integers outside this range are stored in objects of class Bignum.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4400
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, 11 Months ago Karma: 0  
Floating Numbers

Ruby supports integer numbers.

They are also numbers but with decimals. Floating-point numbers are objects of class Float and can be any of the following
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4401
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, 11 Months ago Karma: 0  
String Literals


Ruby strings are simply sequences of 8-bit bytes and they are objects of class String.

Double-quoted strings allow substitution and backslash notation but single-quoted strings don't allow substitution and allow backslash notation only for \\ and \'
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4402
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, 11 Months ago Karma: 0  
We can substitute the value of any Ruby expression into a string using the sequence #{ expr }.
 
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