ozu (Fabio Pesari)
- Login: ozu
- Registered on: 12/28/2019
- Last sign in: 12/29/2020
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 1 | 0 | 1 |
Activity
12/29/2020
-
03:23 PM Ruby Feature #17471: send_if method for improved conditional chaining
- osyo (manga osyo) wrote in #note-1:
```ruby
puts number.tap { break _1 * 2 if _1 > 5 }.send(:-, 1)
puts %w(Merry Christmas).tap { break _1.map(&:upcase) if answer == 'y' }.join(' ')
```
Hello and thanks for sharing this Ruby idiom...
12/26/2020
-
10:37 AM Ruby Feature #17471 (Open): send_if method for improved conditional chaining
- # Background
Method chaining is very important to many Ruby users, since everything in Ruby is an object.
It also allows easier functional programming, because it implements a pipeline where each step can happen without mutation.
...