Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP] Use module_function to create module functions #172

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,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
Loading