|
|
|
|
|
by lucidone
1279 days ago
|
|
I'm not a very experienced Ruby developer but RuboCop does a pretty good job at guiding and teaching you to use `unless` as a guard in method definitions, e.g.: def my_method(required_thing)
raise 'required_thing is required' unless required_thing.present?
...
end
In practice, this hasn't been as issue as a consequence of the tooling and ecosystem around Ruby. |
|