Exception: Rod::MissingDatabase
- Inherits:
-
DatabaseError
- Object
- Exception
- RodException
- DatabaseError
- Rod::MissingDatabase
- Defined in:
- lib/rod/exception.rb
Overview
This exception is raised if there is no database linked with the class.
Instance Method Summary collapse
-
#initialize(klass) ⇒ MissingDatabase
constructor
A new instance of MissingDatabase.
- #to_s ⇒ Object
Constructor Details
#initialize(klass) ⇒ MissingDatabase
Returns a new instance of MissingDatabase.
34 35 36 |
# File 'lib/rod/exception.rb', line 34 def initialize(klass) @klass = klass end |
Instance Method Details
#to_s ⇒ Object
38 39 40 41 |
# File 'lib/rod/exception.rb', line 38 def to_s "Database not selected for class #{@klass}!\n" + "Provide the database class via call to Rod::Model.database_class." end |