Class: Terret::Composition::Row

Inherits:
Data
  • Object
show all
Defined in:
lib/terret/composition.rb

Overview

One resolved row plus the layers that answer for it. Provenance is per row rather than per key, and that falls straight out of wholesale config replacement: exactly one layer is responsible for what a service receives.

plugin_layer is tracked separately from config_layer because a patch may swap plugin: without touching config:, and that swap is the single most consequential edit the format allows — it is how the sandbox gets turned off. Attributing it to the bundle that shipped the row would hide it.

And a swap that says nothing about config: FORWARDS THE OLD CONFIG to the new class, whatever that config held: an !env-resolved key, a workspace list, a path. That follows from replacement being per-field, and it is why the two layers are reported separately — a row whose plugin and config come from different layers is one worth reading twice. A swap that should not inherit has to say config: {} and mean it.

Instance Attribute Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config



79
80
81
# File 'lib/terret/composition.rb', line 79

def config
  @config
end

#config_layerObject (readonly)

Returns the value of attribute config_layer



79
80
81
# File 'lib/terret/composition.rb', line 79

def config_layer
  @config_layer
end

#disabledObject (readonly)

Returns the value of attribute disabled



79
80
81
# File 'lib/terret/composition.rb', line 79

def disabled
  @disabled
end

#idObject (readonly)

Returns the value of attribute id



79
80
81
# File 'lib/terret/composition.rb', line 79

def id
  @id
end

#pluginObject (readonly)

Returns the value of attribute plugin



79
80
81
# File 'lib/terret/composition.rb', line 79

def plugin
  @plugin
end

#plugin_layerObject (readonly)

Returns the value of attribute plugin_layer



79
80
81
# File 'lib/terret/composition.rb', line 79

def plugin_layer
  @plugin_layer
end

#row_layerObject (readonly)

Returns the value of attribute row_layer



79
80
81
# File 'lib/terret/composition.rb', line 79

def row_layer
  @row_layer
end