class PreCommit::Checks::RubySymbolHashrockets
Public Class Methods
description()
click to toggle source
# File lib/plugins/pre_commit/checks/ruby_symbol_hashrockets.rb, line 19 def self.description "Finds ruby 1.8 '=>' hash definitions." end
Public Instance Methods
files_filter(staged_files)
click to toggle source
# File lib/plugins/pre_commit/checks/ruby_symbol_hashrockets.rb, line 7 def files_filter(staged_files) staged_files.grep(/\.rb$/) end
message()
click to toggle source
# File lib/plugins/pre_commit/checks/ruby_symbol_hashrockets.rb, line 11 def message "detected :symbol => value hashrocket:" end
pattern()
click to toggle source
# File lib/plugins/pre_commit/checks/ruby_symbol_hashrockets.rb, line 15 def pattern '[^:](:{1}(?:\$|@|@@|[_A-Za-z])?\w*[=!?]?\s*=>\s*)' end