Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • loop
  • while

Ruby - Loop while condition is true

Execute block of code while a condition is true.

0
472
  • Share on Facebook
  • Share on Google+
  • Share on Twitter
while {{condition}}
   {{body}}
end
ruby

Notes

last update: Dec. 4, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • Counter loop
  • Loop until condition is true
  • Do loop while a condition is true

Other language

  • Scala
  • PHP

Random task

  • Transform scale
  • Range of alphabet chacters
  • Drop all git stash entries
  • Test for expression in string
  • Pluralize word depending on variable
  • Blog
  • About
  • License