lib/backup-agent/features.rb in backup-agent-1.0.0 vs lib/backup-agent/features.rb in backup-agent-1.0.1

- old
+ new

@@ -1,7 +1,12 @@ -module BackupAgent - class << self +module Backup + class Features + def initialize + check_mysql + check_mongodb + end + def check_mysql if @mysql_check.nil? @mysql_check = system('/usr/bin/env mysql --version') ? true : (puts('MySQL is not installed'); false) end @mysql_check @@ -12,21 +17,14 @@ @mongodb_check = system('/usr/bin/env mongod --version') ? true : (puts('MongoDB is not installed')) end @mongodb_check end - def check_features - check_mysql - check_mongodb - end - def mysql_installed? - check_features !!@mysql_check end def mongodb_installed? - check_features !!@mongodb_check end end end \ No newline at end of file