Class: PGTrunk::DependenciesResolver
- Inherits:
-
Object
- Object
- PGTrunk::DependenciesResolver
- Defined in:
- lib/pg_trunk/core/dependencies_resolver.rb
Overview
Resolve dependencies between inter-dependent objects,
identified by database #oid
and comparable to each other.
The method builds the sorted list:
- parent objects moved before their dependants.
- independent objects keeps their original order.
We have no expectations about the natural order here.
Class Method Summary collapse
-
.resolve(objects) ⇒ Array<#oid>
Resolve dependencies between objects.
Class Method Details
.resolve(objects) ⇒ Array<#oid>
Resolve dependencies between objects
20 21 22 |
# File 'lib/pg_trunk/core/dependencies_resolver.rb', line 20 def resolve(objects) new(objects, dependencies).send(:sorted) end |