Exception: BorrowDirect::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BorrowDirect::Error
- Defined in:
- lib/borrow_direct/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bd_code ⇒ Object
readonly
Returns the value of attribute bd_code.
Instance Method Summary collapse
-
#initialize(msg, bd_code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(msg, bd_code = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 |
# File 'lib/borrow_direct/error.rb', line 5 def initialize(msg, bd_code = nil) @bd_code = bd_code if @bd_code msg = "#{@bd_code}: #{msg}" end super(msg) end |
Instance Attribute Details
#bd_code ⇒ Object (readonly)
Returns the value of attribute bd_code.
3 4 5 |
# File 'lib/borrow_direct/error.rb', line 3 def bd_code @bd_code end |