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
#4571
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 until modifier

Syntax:
code until conditional

OR

begin
code
end until conditional


Executes code while conditional is false.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4572
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  
If an until modifier follows a begin statement with no rescue or ensure clauses, code is executed once before conditional is evaluated
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4573
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 for Statement

Syntax:
for variable [, variable ...] in expression [do]
code
end


Executes code once for each element in expression.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4574
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 for...in loop is almost exactly equivalent to:

(expression).each do |variable[, variable...]| code end


except that a for loop doesn't create a new scope for local variables.


A for loop's expression is separated from code by the reserved word do, a newline, or a semicolon.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4575
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 break Statement

Syntax:
break


Terminates the most internal loop. Terminates a method with an associated block if called within the block (with the method returning nil).
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4576
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 next Statement

Syntax:
next


Jumps to next iteration of the most internal loop. Terminates execution of a block if called within a block (with yield or call returning nil).
 
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