Exception: Rools::RuleError
- Inherits:
-
StandardError
- Object
- StandardError
- Rools::RuleError
- Defined in:
- lib/rools/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#inner_error ⇒ Object
readonly
Returns the value of attribute inner_error.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
Instance Method Summary collapse
-
#initialize(rule, inner_error = nil) ⇒ RuleError
constructor
Pass the Rools::Rule that caused the error, and an optional inner_error.
-
#to_s ⇒ Object
returns the name of the associated Rools::Rule, and the message of the inner_error.
Constructor Details
#initialize(rule, inner_error = nil) ⇒ RuleError
Pass the Rools::Rule that caused the error, and an optional inner_error
7 8 9 10 |
# File 'lib/rools/errors.rb', line 7 def initialize(rule, inner_error = nil) @rule = rule @inner_error = inner_error end |
Instance Attribute Details
#inner_error ⇒ Object (readonly)
Returns the value of attribute inner_error.
4 5 6 |
# File 'lib/rools/errors.rb', line 4 def inner_error @inner_error end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
4 5 6 |
# File 'lib/rools/errors.rb', line 4 def rule @rule end |
Instance Method Details
#to_s ⇒ Object
returns the name of the associated Rools::Rule, and the message of the inner_error
13 14 15 |
# File 'lib/rools/errors.rb', line 13 def to_s "#{@rule.name}\n#{@inner_error.to_s}" end |