Class: StrongMigrations::WrappedConnection
- Inherits:
-
Object
- Object
- StrongMigrations::WrappedConnection
- Defined in:
- lib/strong_migrations/schema_dumper.rb
Instance Method Summary collapse
- #columns ⇒ Object
-
#initialize(connection) ⇒ WrappedConnection
constructor
A new instance of WrappedConnection.
-
#send(name) ⇒ Object
forward private methods with send method_missing cannot tell how method was called this is not ideal, but other solutions have drawbacks.
Constructor Details
#initialize(connection) ⇒ WrappedConnection
Returns a new instance of WrappedConnection.
13 14 15 |
# File 'lib/strong_migrations/schema_dumper.rb', line 13 def initialize(connection) @connection = connection end |
Instance Method Details
#columns ⇒ Object
17 18 19 |
# File 'lib/strong_migrations/schema_dumper.rb', line 17 def columns(...) @connection.columns(...).sort_by(&:name) end |
#send(name) ⇒ Object
forward private methods with send method_missing cannot tell how method was called this is not ideal, but other solutions have drawbacks
24 25 26 27 28 29 30 |
# File 'lib/strong_migrations/schema_dumper.rb', line 24 def send(name, ...) if respond_to?(name, true) super else @connection.send(name, ...) end end |