Class: Yarrow::Output::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/yarrow/output/build.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph, output_config) ⇒ Build

Returns a new instance of Build.



6
7
8
9
# File 'lib/yarrow/output/build.rb', line 6

def initialize(graph, output_config)
  @graph = graph
  @output_config = output_config
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



4
5
6
# File 'lib/yarrow/output/build.rb', line 4

def graph
  @graph
end

#output_configObject (readonly)

Returns the value of attribute output_config.



4
5
6
# File 'lib/yarrow/output/build.rb', line 4

def output_config
  @output_config
end

Instance Method Details

#reconcileObject



11
12
13
14
15
16
17
# File 'lib/yarrow/output/build.rb', line 11

def reconcile
  case output_config.reconcile.match
  when "collection/resource" then traverse_by_path(:collection, :resource)
  when "collection" then traverse_by_label(:collection)
  when "resource" then traverse_by_label(:resource)
  end
end