From: ideal one Date: 2011-10-10T13:23:15+09:00 Subject: Check for boolean status in ruby Hi all, I have to check for a boolean condition, and see whether its true or false to continue running a method. Not sure how to implement this in Ruby... Dummycode-- boolean islogged_in = false; # set default boolean value false for i in 0..2 RUN FUNCTION A boolean islogged_in = true # Setting boolean to True after successful FUNCTION A RUN FUNCTION B end For First Iteration, FUNCTION A should run, but for next Iteration onwards, only if System is not logged in FUNCTION A should run else directly FUNCTION B should Run. How do i set a check in Ruby or should i use some other logic other than boolean to do this. -- Posted via http://www.ruby-forum.com/.