Class: Atomically::AdapterCheckService
- Inherits:
-
Object
- Object
- Atomically::AdapterCheckService
- Defined in:
- lib/atomically/adapter_check_service.rb
Instance Method Summary collapse
-
#initialize(klass) ⇒ AdapterCheckService
constructor
A new instance of AdapterCheckService.
- #mysql? ⇒ Boolean
- #pg? ⇒ Boolean
Constructor Details
#initialize(klass) ⇒ AdapterCheckService
Returns a new instance of AdapterCheckService.
3 4 5 |
# File 'lib/atomically/adapter_check_service.rb', line 3 def initialize(klass) @klass = klass end |
Instance Method Details
#mysql? ⇒ Boolean
11 12 13 |
# File 'lib/atomically/adapter_check_service.rb', line 11 def mysql? possible_mysql_klasses.any?{|s| @klass.connection.is_a?(s) } end |
#pg? ⇒ Boolean
7 8 9 |
# File 'lib/atomically/adapter_check_service.rb', line 7 def pg? possible_pg_klasses.any?{|s| @klass.connection.is_a?(s) } end |