Exception: Yapo::Helpers::CustomErrors::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Yapo::Helpers::CustomErrors::ValidationError
- Defined in:
- lib/yapo/helpers/custom_errors.rb
Instance Attribute Summary collapse
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
-
#initialize(exception = nil, msg) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message(msg = nil) ⇒ Object
Constructor Details
#initialize(exception = nil, msg) ⇒ ValidationError
Returns a new instance of ValidationError.
20 21 22 23 |
# File 'lib/yapo/helpers/custom_errors.rb', line 20 def initialize(exception = nil, msg) @original = exception ErrorMessage.new.print((msg)) end |
Instance Attribute Details
#original ⇒ Object (readonly)
Returns the value of attribute original.
18 19 20 |
# File 'lib/yapo/helpers/custom_errors.rb', line 18 def original @original end |
Instance Method Details
#message(msg = nil) ⇒ Object
25 26 27 |
# File 'lib/yapo/helpers/custom_errors.rb', line 25 def (msg = nil) "#{msg}\n" end |