Sha256: a487c5deaee5c6fe12849b7ab948b0fb160fcf7244255cc2b9d3738a4772f4f5

Contents?: true

Size: 563 Bytes

Versions: 2

Compression:

Stored size: 563 Bytes

Contents

module CqmValidators
      module BaseValidator
  
        def build_error(msg, loc, file_name)
          ValidationError.new(message: msg, location: loc, file_name: file_name, validator: @name)
        end
  
        def get_document(input)
          doc = case input
          when File
            input.read
          when Nokogiri::XML::Document
            return input
          else
            input
          end
          Nokogiri::XML(doc.to_s) { |conf| conf.strict.nonet.noblanks } #grumble, grumble nokogiri java @SS 
        end
      end
  
end
  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cqm-validators-0.1.1 lib/base_validator.rb
cqm-validators-0.1.0 lib/base_validator.rb