Class: TableSaw::DependencyGraph::Build
- Inherits:
-
Object
- Object
- TableSaw::DependencyGraph::Build
- Defined in:
- lib/table_saw/dependency_graph/build.rb
Instance Attribute Summary collapse
-
#manifest ⇒ Object
readonly
Returns the value of attribute manifest.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(manifest) ⇒ Build
constructor
A new instance of Build.
Constructor Details
#initialize(manifest) ⇒ Build
Returns a new instance of Build.
8 9 10 11 |
# File 'lib/table_saw/dependency_graph/build.rb', line 8 def initialize(manifest) @manifest = manifest @records = {} end |
Instance Attribute Details
#manifest ⇒ Object (readonly)
Returns the value of attribute manifest.
6 7 8 |
# File 'lib/table_saw/dependency_graph/build.rb', line 6 def manifest @manifest end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
6 7 8 |
# File 'lib/table_saw/dependency_graph/build.rb', line 6 def records @records end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/table_saw/dependency_graph/build.rb', line 13 def call manifest.tables.values.sort_by { |t| t.partial? ? 1 : 0 }.each do |table| add TableSaw::DependencyGraph::AddDirective.new(table.name, ids: select_ids(table), partial: table.partial?, has_many: table.has_many) end records end |