Exception: Error
- Inherits:
-
StandardError
- Object
- StandardError
- Error
- Defined in:
- lib/error.rb
Overview
A base class for Error classes in your application.
Instance Attribute Summary collapse
-
#target ⇒ Object
The target of the error.
Instance Method Summary collapse
-
#initialize(target = nil) ⇒ Error
constructor
A new instance of Error.
-
#to_s ⇒ String
The String to print.
Constructor Details
#initialize(target = nil) ⇒ Error
Returns a new instance of Error.
12 13 14 |
# File 'lib/error.rb', line 12 def initialize(target=nil) @target = target end |
Instance Attribute Details
#target ⇒ Object
The target of the error.
9 10 11 |
# File 'lib/error.rb', line 9 def target @target end |
Instance Method Details
#to_s ⇒ String
The String to print.
19 20 21 |
# File 'lib/error.rb', line 19 def to_s @target.to_s end |