Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 222 Bytes

BOOLEAN.md

File metadata and controls

19 lines (15 loc) · 222 Bytes

Boolean

to_bool aka to_b

Returns self.

true.to_bool #=> true
false.to_b   #=> false

to_i

Returns the integer representation of a boolean.

true.to_i  #=> 1
false.to_i #=> 0