Class Kwalify::BaseError
In: kwalify/errors.rb
Parent: KwalifyError

Methods

<=>   message   new   path   to_s  

External Aliases

to_s -> _to_s

Attributes

error_symbol  [R] 
linenum  [RW] 
path  [R] 
rule  [R] 
value  [R] 

Public Class methods

[Source]

# File kwalify/errors.rb, line 23
      def initialize(message="", path=nil, value=nil, rule=nil, error_symbol=nil)
         super(message)
         @path        = path
         @rule         = rule
         @value        = value
         @error_symbol = error_symbol
      end

Public Instance methods

[Source]

# File kwalify/errors.rb, line 47
      def <=>(ex)
        return @linenum <=> ex.linenum
      end

[Source]

# File kwalify/errors.rb, line 39
      def message
         _to_s
      end

[Source]

# File kwalify/errors.rb, line 33
      def path
         return @path == '' ? "/" : @path
      end

[Source]

# File kwalify/errors.rb, line 43
      def to_s
         return "[#{path()}] #{message()}"
      end

[Validate]