Skip to content

Commit c94d7cc

Browse files
authored
Update file-naming.md
Made this section strictly about naming files.
1 parent bb34f27 commit c94d7cc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ruby/file-naming.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# Ruby module Convention > File Naming
1+
# Ruby File Convention > File Naming
22

33
## snake_case
44

55
* Should be in lowercase.
6-
* If the name contains multiple words, an underscore (_) should separate it.E.g. expression_engine
7-
* The name should resonate with the class or methods inside the module
6+
* If the name contains multiple words, an underscore (_) should separate it.E.g. expression_engine.
7+
* Should match the name of the class or module it contains.
88

99
```ruby
10-
require './application_record'
10+
# This class is in the file named 'car.rb'
11+
1112
class Car
12-
...
13+
# ...
14+
end
1315
```

0 commit comments

Comments
 (0)