Skip to content

Commit

Permalink
[CLEANUP] Use module_function to create module functions
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee committed Oct 6, 2023
1 parent 95b2ffe commit 780d3da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,3 @@ Rails/RootPathnameMethods:
Style/MixinUsage:
Exclude:
- 'Rakefile'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, Autocorrect.
# SupportedStyles: module_function, extend_self, forbidden
Style/ModuleFunction:
Exclude:
- 'lib/page_title_helper.rb'
2 changes: 1 addition & 1 deletion lib/page_title_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
module PageTitleHelper
# https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/interpolations.rb
module Interpolations
extend self
module_function

def self.interpolate(pattern, *args)
instance_methods(false).sort.reverse.inject(pattern.to_s.dup) do |result, tag|
Expand Down

0 comments on commit 780d3da

Please sign in to comment.