Private member naming (ARCH6009)
Esta página aún no está disponible en tu idioma.
Key ruby.naming.private-method-naming · Severity info · Category naming
Private (non-public) members should follow the language’s privacy-signalling convention. In Ruby, private methods should be grouped under private and named in snake_case, not interleaved with the public API.
Incorrect
Section titled “Incorrect”class Report def generate formatRows end
def formatRows @rows.map(&:to_s) endendCorrect
Section titled “Correct”class Report def generate format_rows end
private
def format_rows @rows.map(&:to_s) endendGroup private methods under private and name them in snake_case.