Class: Highway::Compiler::Build::Output::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/highway/compiler/build/output/manifest.rb

Overview

This class represents a build manifest. It contains compiled step invocations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeManifest

Initialize an instance.



20
21
22
# File 'lib/highway/compiler/build/output/manifest.rb', line 20

def initialize()
  @invocations = Array.new()
end

Instance Attribute Details

#invocationsArray<Highway::Compiler::Build::Output::Invocation> (readonly)

Invocations in the manifest.



32
33
34
# File 'lib/highway/compiler/build/output/manifest.rb', line 32

def invocations
  @invocations
end

#presetString

The preset.

Returns:

  • (String)


27
28
29
# File 'lib/highway/compiler/build/output/manifest.rb', line 27

def preset
  @preset
end

Instance Method Details

#add_invocation(index:, step_class:, parameters:, policy:, keypath:) ⇒ Void

Add an invocation to the manifest.

Parameters:

  • index (Integer)

    Index of invocation, 1-based.

  • step_class (Class)

    Definition class of the step.

  • parameters (Highway::Compiler::Analyze::Tree::Values::Hash)

    Hash value of step parameters.

  • policy (:normal, :always)

    Execution policy of the step invocation.

  • keypath (Array<String>)

    A keypath used for debugging purposes.

Returns:

  • (Void)


43
44
45
# File 'lib/highway/compiler/build/output/manifest.rb', line 43

def add_invocation(index:, step_class:, parameters:, policy:, keypath:)
  @invocations << Invocation.new(index: index, step_class: step_class, parameters: parameters, policy: policy, keypath: keypath)
end