Class: TailorHook::Hook
- Inherits:
-
Object
- Object
- TailorHook::Hook
- Defined in:
- lib/tailor-hook/hook.rb
Instance Method Summary collapse
- #hook! ⇒ Object
-
#initialize(path, ignore_list = []) ⇒ Hook
constructor
A new instance of Hook.
Constructor Details
Instance Method Details
#hook! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tailor-hook/hook.rb', line 8 def hook! @errors = [] files_to_check.each do |path| check_file(path) end if @errors.empty? result = 0 else @errors.each { |e| print e } result = 1 end result end |