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
#4403
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 Arrays:

Literals of Ruby Array are created by placing a comma-separated series of object references between square brackets.

A trailing comma is ignored.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4404
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 Hashes

A literal Ruby Hash is created by placing a list of key/value pairs between braces, with either a comma or the sequence => between the key and the value.

A trailing comma is ignored.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4405
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 Ranges:

A Range represents an interval.a set of values with a start and an end. Ranges may be constructed using the s..e and s...e literals, or with Range.new
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4406
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  
Ranges constructed using .. run from the start to the end inclusively.

Those created using exclude the end value. When used as an iterator, ranges return each value in the sequence.

A range (1..5) means it includes 1, 2, 3, 4, 5 values and a range (1...5) means it includes 2, 3, 4 values
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4407
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  
A String object in Ruby holds and manipulates an arbitrary sequence of one or more bytes, typically representing characters that represent human language
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4408
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  
The simplest string literals are enclosed in single quotes (the apostrophe character).

The text within the quote marks is the value of the string:

'This is a simple Ruby string literal'
 
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