Medium Ruby

Use Ruby 3+ features

Rule Description

Leverage modern Ruby features for cleaner code:
- Pattern matching: `case obj in { name:, age: } then ...`
- Endless methods: `def square(x) = x * x`
- Hash shorthand: `{ x:, y: }` instead of `{ x: x, y: y }`
- Numbered block parameters: `array.map { _1 * 2 }`
- Data classes for simple value objects

Keep Ruby version at 3.2+ for best performance and features.

Included in Rulesets

Rails Standards
36 rules • 1 standard
View
Ruby Style Guide
25 rules • 1 standard
View
Code Review Standards
58 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
Medium
Category
Ruby
Used in
3 rulesets