class Highway::Runtime::Report
This class represents a report of running a step during runtime. It contains metrics (such as status and duration) as well as metadata set by steps themselves.
Attributes
The custom data in the report.
@return [Hash]
Duration of the step, in seconds.
@return [Numeric]
An error that the step failed with, if any.
@return [FastlaneCore::Interface::FastlaneException, nil]
The invocation.
@return [Highway::Compiler::Build::Output::Invocation]
Result of the step, one of: `:success`, `:failure`, `:skip`.
@return [Symbol]
Public Class Methods
Initialize an instance.
@param invocation [Highway::Compiler::Build::Output::Invocation] The invocation. @param artifacts_dir [Path] Dir in which to prepare artifacts.
# File lib/highway/runtime/report.rb, line 18 def initialize(invocation:, artifacts_dir:) @invocation = invocation @artifacts_dir = artifacts_dir @data = Hash.new() end
Public Instance Methods
Get custom data value for given key.
@param key [String] A key.
@return [Object, nil]
# File lib/highway/runtime/report.rb, line 54 def [](key) @data[key] end
Set custom data value for given key.
@param key [String] A key. @param value [Object, nil] A value.
@return [Void]
# File lib/highway/runtime/report.rb, line 64 def []=(key, value) @data[key] = value end
Prepare an artifact file with a given name and return its path.
@param name [String] An artifact file name.
@return [String]
# File lib/highway/runtime/report.rb, line 73 def prepare_artifact(name) File.join(@artifacts_dir, "#{invocation.identifier}-#{name}") end