Class: Goodsheet::ValidationError

Inherits:
Object
  • Object
show all
Defined in:
lib/goodsheet/validation_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(line, val_err) ⇒ ValidationError

Returns a new instance of ValidationError.



4
5
6
7
# File 'lib/goodsheet/validation_error.rb', line 4

def initialize(line, val_err)
  @line = line
  @val_err = val_err
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/goodsheet/validation_error.rb', line 9

def to_s
  "line #{@line} is invalid for the following reason(s): #{@val_err.full_messages.join(', ')}"
end