Skip to content

Commit

Permalink
Merge pull request #295 from ifad/chore/remove-redundant-self
Browse files Browse the repository at this point in the history
Remove redundant self
  • Loading branch information
tagliala authored Sep 16, 2024
2 parents 05f85bf + bf79f89 commit 23e9b29
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/doc_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DocKey

# Constructs [DocKey] from the input string, which should be the output from [#to_s].
def self.parse(doc_key_str)
self.new(*doc_key_str.split('/'))
new(*doc_key_str.split('/'))
end

# Constructor. The app and doc_id may only be comprised of alphanumeric letters and
Expand Down
4 changes: 2 additions & 2 deletions lib/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def self.create(base_dir, doc_key)
raise DocumentExists.new if File.exist? doc_dir

FileUtils.mkdir_p doc_dir
self.new base_dir, doc_key
new base_dir, doc_key
end

# Loads the document information. Raises [DocumentNotFound] if the document does not exist.
Expand All @@ -60,7 +60,7 @@ def self.create(base_dir, doc_key)
def self.load(base_dir, doc_key)
raise DocumentNotFound.new unless exists? base_dir, doc_key

doc = self.new base_dir, doc_key
doc = new base_dir, doc_key
end

# Deletes the document directory (and all contents) if it exists.
Expand Down
2 changes: 1 addition & 1 deletion lib/heathen/filename.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def self.muck_mime_type(mime_type)
#
# @return [String] a new file name, with an appropriate extension
def self.suggest_in_new_dir(filename, mime_type, base_dir, new_dir)
file = self.suggest filename, mime_type
file = suggest filename, mime_type
"#{new_dir}#{file[base_dir.length..-1]}"
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/heathen/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def expect_mime_type(pattern)
# Performs a sub-task, defined by action. See [Task] for details.
def perform_task(action)
task_proc = Task.find(action, job.mime_type)[:proc]
self.instance_eval(&task_proc)
instance_eval(&task_proc)
end

# Called to clean up temporary files at end of processing
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq_workers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class LegacyPurgeWorker

::Sidekiq::Cron::Job.load_from_hash('legacy_purge_worker' => {
'cron' => '0 6 * * *',
'class' => self.name,
'class' => name,
})

# Looks for old legacy docs and deletes them
Expand Down

0 comments on commit 23e9b29

Please sign in to comment.