class PreCommit::Checks::BeforeAll

Public Class Methods

description() click to toggle source
# File lib/plugins/pre_commit/checks/before_all.rb, line 23
def self.description
  "Find ruby files with 'before :all' pattern"
end

Public Instance Methods

extra_grep() click to toggle source
# File lib/plugins/pre_commit/checks/before_all.rb, line 11
def extra_grep
  %w{-v //}
end
files_filter(staged_files) click to toggle source
# File lib/plugins/pre_commit/checks/before_all.rb, line 7
def files_filter(staged_files)
  staged_files.grep(/\.rb$/)
end
message() click to toggle source
# File lib/plugins/pre_commit/checks/before_all.rb, line 15
def message
  "before(:all) found:"
end
pattern() click to toggle source
# File lib/plugins/pre_commit/checks/before_all.rb, line 19
def pattern
  "before.*:all"
end