Class: Harnex::ArtifactReport::ValidationResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/harnex/artifact_report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bytesObject

Returns the value of attribute bytes

Returns:

  • (Object)

    the current value of bytes



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def bytes
  @bytes
end

#diagnosticsObject

Returns the value of attribute diagnostics

Returns:

  • (Object)

    the current value of diagnostics



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def diagnostics
  @diagnostics
end

#okObject

Returns the value of attribute ok

Returns:

  • (Object)

    the current value of ok



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def ok
  @ok
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def path
  @path
end

#reportObject

Returns the value of attribute report

Returns:

  • (Object)

    the current value of report



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def report
  @report
end

#schemaObject

Returns the value of attribute schema

Returns:

  • (Object)

    the current value of schema



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def schema
  @schema
end

#sha256Object

Returns the value of attribute sha256

Returns:

  • (Object)

    the current value of sha256



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def sha256
  @sha256
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



21
22
23
# File 'lib/harnex/artifact_report.rb', line 21

def status
  @status
end

Instance Method Details

#public_payload(final: false) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/harnex/artifact_report.rb', line 25

def public_payload(final: false)
  {
    "ok" => !!ok,
    "status" => status,
    "path" => path,
    "bytes" => bytes,
    "sha256" => sha256,
    "schema" => schema,
    "final" => !!final,
    "diagnostics" => diagnostics || []
  }
end