Skip to content

Commit e193098

Browse files
committed
refactor: use longform definition of modules over shorthand
1 parent 7c66db0 commit e193098

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

lib/code_teams/utils.rb

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
module CodeTeams::Utils
2-
extend self
1+
module CodeTeams
2+
module Utils
3+
extend self
34

4-
def underscore(string)
5-
string.gsub('::', '/')
6-
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
7-
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
8-
.tr('-', '_')
9-
.downcase
10-
end
5+
def underscore(string)
6+
string.gsub('::', '/')
7+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
8+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
9+
.tr('-', '_')
10+
.downcase
11+
end
1112

12-
def demodulize(string)
13-
string.split('::').last
13+
def demodulize(string)
14+
string.split('::').last
15+
end
1416
end
1517
end

0 commit comments

Comments
 (0)