Fix Naming/MethodParameterName cop in the samples.
This commit is contained in:
parent
846e704048
commit
fcadea61e2
|
@ -42,7 +42,9 @@ Naming/AccessorMethodName:
|
||||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
||||||
# AllowedNames: io, id, to, by, on, in, at, ip, db, os
|
# AllowedNames: io, id, to, by, on, in, at, ip, db, os
|
||||||
Naming/MethodParameterName:
|
Naming/MethodParameterName:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'lib/**/*.rb'
|
||||||
|
- 'test/**/*.rb'
|
||||||
|
|
||||||
# Offense count: 721
|
# Offense count: 721
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
|
|
|
@ -20,12 +20,12 @@ class ZipDialog < ZipDialogUI
|
||||||
self, SLOT('extract_files()'))
|
self, SLOT('extract_files()'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def zipfile(&proc)
|
def zipfile(&a_proc)
|
||||||
Zip::File.open(@zip_filename, &proc)
|
Zip::File.open(@zip_filename, &a_proc)
|
||||||
end
|
end
|
||||||
|
|
||||||
def each(&proc)
|
def each(&a_proc)
|
||||||
Zip::File.foreach(@zip_filename, &proc)
|
Zip::File.foreach(@zip_filename, &a_proc)
|
||||||
end
|
end
|
||||||
|
|
||||||
def refresh
|
def refresh
|
||||||
|
|
|
@ -9,10 +9,10 @@ require 'find'
|
||||||
|
|
||||||
module Zip
|
module Zip
|
||||||
module ZipFind
|
module ZipFind
|
||||||
def self.find(path, zipFilePattern = /\.zip$/i)
|
def self.find(path, zip_file_pattern = /\.zip$/i)
|
||||||
Find.find(path) do |filename|
|
Find.find(path) do |filename|
|
||||||
yield(filename)
|
yield(filename)
|
||||||
next unless zipFilePattern.match(filename) && File.file?(filename)
|
next unless zip_file_pattern.match(filename) && File.file?(filename)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Zip::File.foreach(filename) do |entry|
|
Zip::File.foreach(filename) do |entry|
|
||||||
|
@ -24,9 +24,9 @@ module Zip
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_file(path, fileNamePattern, zipFilePattern = /\.zip$/i)
|
def self.find_file(path, filename_pattern, zip_file_pattern = /\.zip$/i)
|
||||||
find(path, zipFilePattern) do |filename|
|
find(path, zip_file_pattern) do |filename|
|
||||||
yield(filename) if fileNamePattern.match(filename)
|
yield(filename) if filename_pattern.match(filename)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -58,8 +58,8 @@ if $PROGRAM_NAME == __FILE__
|
||||||
puts "Usage: #{$PROGRAM_NAME} PATH ZIPFILENAME_PATTERN FILNAME_PATTERN"
|
puts "Usage: #{$PROGRAM_NAME} PATH ZIPFILENAME_PATTERN FILNAME_PATTERN"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.report_entry_found(fileName)
|
def self.report_entry_found(filename)
|
||||||
puts fileName
|
puts filename
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue