Exception: Kwalify::BaseError
- Inherits:
-
KwalifyError
- Object
- StandardError
- KwalifyError
- Kwalify::BaseError
- Defined in:
- lib/kwalify/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error_symbol ⇒ Object
readonly
Returns the value of attribute error_symbol.
-
#linenum ⇒ Object
Returns the value of attribute linenum.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #_to_s ⇒ Object
-
#initialize(message = "", path = nil, value = nil, rule = nil, error_symbol = nil) ⇒ BaseError
constructor
A new instance of BaseError.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(message = "", path = nil, value = nil, rule = nil, error_symbol = nil) ⇒ BaseError
Returns a new instance of BaseError.
23 24 25 26 27 28 29 |
# File 'lib/kwalify/errors.rb', line 23 def initialize(="", path=nil, value=nil, rule=nil, error_symbol=nil) super() @error_symbol = error_symbol @rule = rule @path = path @value = value end |
Instance Attribute Details
#error_symbol ⇒ Object (readonly)
Returns the value of attribute error_symbol.
30 31 32 |
# File 'lib/kwalify/errors.rb', line 30 def error_symbol @error_symbol end |
#linenum ⇒ Object
Returns the value of attribute linenum.
31 32 33 |
# File 'lib/kwalify/errors.rb', line 31 def linenum @linenum end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
30 31 32 |
# File 'lib/kwalify/errors.rb', line 30 def path @path end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
30 31 32 |
# File 'lib/kwalify/errors.rb', line 30 def rule @rule end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
30 31 32 |
# File 'lib/kwalify/errors.rb', line 30 def value @value end |
Instance Method Details
#_to_s ⇒ Object
37 |
# File 'lib/kwalify/errors.rb', line 37 alias :_to_s :to_s |
#message ⇒ Object
39 40 41 |
# File 'lib/kwalify/errors.rb', line 39 def _to_s end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/kwalify/errors.rb', line 43 def to_s return "[#{path()}] #{()}" end |