Exception: Rod::MissingDatabase

Inherits:
DatabaseError show all
Defined in:
lib/rod/exception.rb

Overview

This exception is raised if there is no database linked with the class.

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ MissingDatabase



34
35
36
# File 'lib/rod/exception.rb', line 34

def initialize(klass)
  @klass = klass
end

Instance Method Details

#to_sObject



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