Refactor CLI::InternalAuditModifiedCasks.

This commit is contained in:
Markus Reiter 2017-05-20 02:52:18 +02:00
parent 326c425dc6
commit 6acca4e09a

View File

@ -8,9 +8,12 @@ module Hbc
end
def self.run(*args)
commit_range = commit_range(args)
cleanup = args.any? { |a| a =~ /^-+c(leanup)?$/i }
new(commit_range, cleanup: cleanup).run
new(*args).run
end
def initialize(*args)
@commit_range = self.class.commit_range(args)
@cleanup = args.any? { |a| a =~ /^-+c(leanup)?$/i }
end
def self.commit_range(args)
@ -41,11 +44,6 @@ module Hbc
EOS
end
def initialize(commit_range, cleanup: false)
@commit_range = commit_range
@cleanup = cleanup
end
attr_reader :commit_range
def cleanup?