Class: SynchronizePostgresStoredProcedures::StoredProcedures::Synchronizer

Inherits:
Object
  • Object
show all
Defined in:
lib/synchronize_postgres_stored_procedures/stored_procedures/synchronizer.rb

Direct Known Subclasses

Pg11, Pg12, Pg9

Instance Method Summary collapse

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