class Norma43::LineParsers::FileFormatValidator

Public Instance Methods

errors() click to toggle source
# File lib/norma43/line_parsers/file_format_validator.rb, line 15
def errors
  errors = []
  %w(11 00).include?(record_type) || errors << ("Must start with 00 (was ”#{record_type}”)")
  errors
end
has_document?() click to toggle source
# File lib/norma43/line_parsers/file_format_validator.rb, line 9
def has_document?; file_type == "00" end
valid?() click to toggle source
# File lib/norma43/line_parsers/file_format_validator.rb, line 11
def valid?
  errors.empty?
end