rspec/rules/S1446/rule.adoc
Arseniy Zaostrovnykh f1aa7fbd60 update; grammar fixes
2021-02-11 16:56:46 +01:00

22 lines
553 B
Plaintext

A dynamic class defines an object that can be altered at run time by adding or changing properties and methods. This extremely powerful mechanism should be used very carefully, and only in very limited use cases.
Indeed, by definition dynamic classes make refactoring difficult and prevent the compiler from raising potential errors at compile time.
== Noncompliant Code Example
----
dynamic public class DynamicFoo
{...}
----
== Compliant Solution
----
public class Foo //Note that the class has been renamed to avoid confusion
{...}
----