Permalink
Browse files

got rid of initialize method

  • Loading branch information...
1 parent 1cc112e commit 0d348bc1dcc1f7f64ebb9e062269e9840ece0819 Martin Carel committed Mar 5, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 validator.rb
View
@@ -12,10 +12,6 @@ def self.call args
attr_reader :file_data
attr_reader :errors
- def initialize
- @errors = []
- end
-
def parse_args args
if args.length != 1
@@ -37,7 +33,7 @@ def validate_subtitles
end
def display_results
- if @errors.any?
+ if @errors && !@errors.empty?
@errors.map{|e| puts e}
else
puts "No errors found."
@@ -59,6 +55,7 @@ def parse_data
def validate subtitles
previous_stop = "00:00:00,000" # smallest possible value
+ @errors = []
subtitles.each do |array|
id = array[0]

0 comments on commit 0d348bc

Please sign in to comment.