Exception: KXI::Exceptions::AbstractException
- Inherits:
-
Exception
- Object
- Exception
- KXI::Exceptions::AbstractException
- Defined in:
- lib/kxi/exceptions/abstract_exception.rb
Overview
Raised when method that was supposed to be implemented by super class wasn’t
Instance Method Summary collapse
-
#class ⇒ Class
Returns the abstract class.
-
#file ⇒ String
Returns the file that contains the abstract class.
-
#initialize(cl) ⇒ AbstractException
constructor
Instantiates the AbstractException class.
-
#method ⇒ String
Returns name of the abstract method.
Constructor Details
#initialize(cl) ⇒ AbstractException
Instantiates the KXI::Exceptions::AbstractException class
26 27 28 29 30 31 32 |
# File 'lib/kxi/exceptions/abstract_exception.rb', line 26 def initialize(cl) frame = Reflection::StackFrame.callstack(3).first @file = frame.file @mtd = frame.method super("Abstract method #{cl.name}##{@mtd} wasn't implemented!") @class = cl end |
Instance Method Details
#class ⇒ Class
Returns the abstract class
8 9 10 |
# File 'lib/kxi/exceptions/abstract_exception.rb', line 8 def class @class end |
#file ⇒ String
Returns the file that contains the abstract class
14 15 16 |
# File 'lib/kxi/exceptions/abstract_exception.rb', line 14 def file @file end |
#method ⇒ String
Returns name of the abstract method
20 21 22 |
# File 'lib/kxi/exceptions/abstract_exception.rb', line 20 def method @mtd end |