rspec/rules/S2372/description.adoc

5 lines
285 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
Property getters should be simple operations that are always safe to call. If exceptions need to be thrown, it is best to convert the property to a method.
2021-02-02 15:02:10 +01:00
2020-06-30 12:48:07 +02:00
It is valid to throw exceptions from indexed property getters and from property setters, which are not detected by this rule.