mirror of
https://github.com/jbranchaud/til
synced 2026-01-02 22:58:01 +00:00
Update are-they-all-true.md
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
There is a method on `Enumerable` that allows you to check against
|
||||
everything in a collection. This is the `all?` method.
|
||||
For instance, if you want to check if an array of values are all
|
||||
true, you can call it without arguments:
|
||||
truthy, you can call it without arguments:
|
||||
|
||||
```ruby
|
||||
> [true, true, true].all?
|
||||
> [true, 1, ''].all?
|
||||
# true
|
||||
> [true, false, true].all?
|
||||
# false
|
||||
|
||||
Reference in New Issue
Block a user