Module: DbUrlHelper::Registerable
- Included in:
- Adapter::Postgresql, Credentials::Credentialias, Credentials::Environment, Credentials::Null, Lookup::Boutons
- Defined in:
- lib/db_url_helper/testable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.base(klass) ⇒ Object
7 8 9 |
# File 'lib/db_url_helper/testable.rb', line 7 def base klass Object.const_get klass.name.split('::')[0..-2].join('::') end |
.included(klass) ⇒ Object
10 11 12 13 |
# File 'lib/db_url_helper/testable.rb', line 10 def included klass klass.send :extend, self base(klass).register klass end |
Instance Method Details
#testable? ⇒ Boolean
3 4 5 |
# File 'lib/db_url_helper/testable.rb', line 3 def testable? Object.const_defined? self.const_get :DEPENDS end |