Method: PreCommit::ErrorList#initialize

Defined in:
lib/pre-commit/error_list.rb

#initialize(errors = []) ⇒ ErrorList

Returns a new instance of ErrorList.


6
7
8
9
10
11
12
# File 'lib/pre-commit/error_list.rb', line 6

def initialize(errors = [])
  case errors
  when "",nil then errors = []
  when String then errors = [PreCommit::Line.new(errors)]
  end
  super errors
end