Class: CodeKindly::Utils::SQL
- Inherits:
-
Object
- Object
- CodeKindly::Utils::SQL
- Defined in:
- lib/code_kindly/utils/sql.rb
Class Method Summary collapse
- .method_missing(method, *args) ⇒ Object
- .respond_to_missing?(method, _include_all = false) ⇒ Boolean
Class Method Details
.method_missing(method, *args) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/code_kindly/utils/sql.rb', line 9 def method_missing(method, *args) m_name = method.to_s return process(m_name, *args) if respond_to_missing?(m_name) select_mn = 'select_' + m_name return process(select_mn, *args) if respond_to_missing?(select_mn) super end |
.respond_to_missing?(method, _include_all = false) ⇒ Boolean
17 18 19 20 |
# File 'lib/code_kindly/utils/sql.rb', line 17 def respond_to_missing?(method, _include_all = false) return false unless default_connection_class default_connection_class.connection.respond_to?(method) end |