Class: NtqTools::Monitors::Database
- Defined in:
- lib/ntq_tools/monitors/database.rb
Class Method Summary collapse
Class Method Details
.check ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/ntq_tools/monitors/database.rb', line 15 def check begin themodel = ActiveRecord::Base.descendants.find { |model| model.table_exists? && !model.abstract_class? } themodel.first return true rescue return false end end |
.is_installed? ⇒ Boolean
11 12 13 |
# File 'lib/ntq_tools/monitors/database.rb', line 11 def is_installed? defined?(::ActiveRecord).present? end |
.name ⇒ Object
7 8 9 |
# File 'lib/ntq_tools/monitors/database.rb', line 7 def name "database" end |