Understanding Boolean Methods in Ruby With Examples
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.