exposure_zeroBooleans

Overview

Boolean values in Ruby represent two states: true and false. These values are essential for making decisions in programs, controlling loops, and implementing conditional logic that you will learn in the next lessons.
Ruby uses true and false as boolean values, which are instances of the TrueClass and FalseClass classes, respectively.
is_valid = true
has_admin_role = false

is_valid.class #=> TrueClass
has_admin_role.class #=> FalseClass

Nil

In addition to representing true and false, Ruby also provides a special value called nil. nil signifies the absence of value or the lack of existence of an object. It's often used to denote that a variable or expression doesn't hold any meaningful data.
empty_value = nil
empty_value.class #=> NilClass
More about boolean values usage in the next lessons.