Class: SynchronizePostgresStoredProcedures::StoredProcedures::Synchronizer
- Inherits:
-
Object
- Object
- SynchronizePostgresStoredProcedures::StoredProcedures::Synchronizer
- Defined in:
- lib/synchronize_postgres_stored_procedures/stored_procedures/synchronizer.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ Synchronizer
constructor
A new instance of Synchronizer.
- #synchronize_all(procedures) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Synchronizer
Returns a new instance of Synchronizer.
4 5 6 |
# File 'lib/synchronize_postgres_stored_procedures/stored_procedures/synchronizer.rb', line 4 def initialize(connection) @connection = connection end |
Instance Method Details
#synchronize_all(procedures) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/synchronize_postgres_stored_procedures/stored_procedures/synchronizer.rb', line 12 def synchronize_all(procedures) procedures.sort_by(&:last).each do |source, name| synchronize(source, name) end sp_clean(procedures.map(&:last)) end |