Class name CamelCase (ARCH6001)
هذا المحتوى غير متوفر بلغتك بعد.
Key ruby.naming.class-name-camelcase · Severity warning · Category naming
In Ruby, class and module names must use CamelCase (each word capitalized, no separators). snake_case or underscored names violate the Ruby constant convention and hurt readability.
Incorrect
Section titled “Incorrect”class user_account def initialize(name) @name = name endendCorrect
Section titled “Correct”class UserAccount def initialize(name) @name = name endendName classes and modules in CamelCase; separate words by capitalization rather than underscores.