From c94d7cc1f0ae96db82ba841c6be62ed4741eaea1 Mon Sep 17 00:00:00 2001 From: LDA <143745153+load-a@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:10:08 -0400 Subject: [PATCH] Update file-naming.md Made this section strictly about naming files. --- ruby/file-naming.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ruby/file-naming.md b/ruby/file-naming.md index 3debdfa..7032580 100644 --- a/ruby/file-naming.md +++ b/ruby/file-naming.md @@ -1,13 +1,15 @@ -# Ruby module Convention > File Naming +# Ruby File Convention > File Naming ## snake_case * Should be in lowercase. -* If the name contains multiple words, an underscore (_) should separate it.E.g. expression_engine -* The name should resonate with the class or methods inside the module +* If the name contains multiple words, an underscore (_) should separate it.E.g. expression_engine. +* Should match the name of the class or module it contains. ```ruby -require './application_record' +# This class is in the file named 'car.rb' + class Car - ... + # ... +end ```