Sha256: 0abcec9b683f2344ccf4eb0e76b167dd5e147a1ce103a0674bc7cede85e8ba63

Contents?: true

Size: 886 Bytes

Versions: 10

Compression:

Stored size: 886 Bytes

Contents

module Nokogiri
  module XML
    ###
    # This class provides information about XML SyntaxErrors.  These
    # exceptions are typically stored on Nokogiri::XML::Document#errors.
    class SyntaxError < ::Nokogiri::SyntaxError
      attr_reader :domain
      attr_reader :code
      attr_reader :level
      attr_reader :file
      attr_reader :line
      attr_reader :str1
      attr_reader :str2
      attr_reader :str3
      attr_reader :int1
      attr_reader :column

      ###
      # return true if this is a non error
      def none?
        level == 0
      end

      ###
      # return true if this is a warning
      def warning?
        level == 1
      end

      ###
      # return true if this is an error
      def error?
        level == 2
      end

      ###
      # return true if this error is fatal
      def fatal?
        level == 3
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
rubyjedi-nokogiri_java-1.4.0.20100513161003-java lib/nokogiri/xml/syntax_error.rb
jwagener-nokogiri-1.4.1 lib/nokogiri/xml/syntax_error.rb
revo-nokogiri-1.4.1-java lib/nokogiri/xml/syntax_error.rb
revo-nokogiri-1.4.0.3-java lib/nokogiri/xml/syntax_error.rb
revo-nokogiri-1.4.0-java lib/nokogiri/xml/syntax_error.rb
revo-nokogiri-1.4.0.20100202165440-java lib/nokogiri/xml/syntax_error.rb
nokogiri-1.4.1-x86-mswin32 lib/nokogiri/xml/syntax_error.rb
nokogiri-1.4.1-x86-mingw32 lib/nokogiri/xml/syntax_error.rb
nokogiri-1.4.1-java lib/nokogiri/xml/syntax_error.rb
nokogiri-1.4.1 lib/nokogiri/xml/syntax_error.rb