paint-brush
Understanding Boolean Methods in Ruby With Examplesby@SELMAe33
7,252 reads
7,252 reads

Understanding Boolean Methods in Ruby With Examples

by Selma Ndi (Data Girl)3mFebruary 12th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Ruby language does not have a Data Type called “Boolean” This is a form of data with only two possible values (usually “true” and “false”) Ruby has a Boolean Data Type, otherwise called Predicates or Query. These are methods that end with a question mark (?) These are called 'Boolean Methods' Ruby's all? method returns true if the block never returns false or nil. If the block is not given, Ruby adds an implicit block of { |obj| obj } which will cause all? to return true when none of the collection members are false.
featured image - Understanding Boolean Methods in Ruby With Examples
Selma Ndi (Data Girl) HackerNoon profile picture
Selma Ndi (Data Girl)

Selma Ndi (Data Girl)

@SELMAe33

Full Stack Developer

About @SELMAe33
LEARN MORE ABOUT @SELMAE33'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Selma Ndi (Data Girl) HackerNoon profile picture
Selma Ndi (Data Girl)@SELMAe33
Full Stack Developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite