Class: LittleGhost::Assembly::Attempt

Inherits:
Data
  • Object
show all
Defined in:
lib/little_ghost/assembly_execution.rb,
lib/little_ghost/assembly_execution.rb

Overview

One bounded attempt to execute a child Assembly step.

It records timing, normalized usage, terminal status, and a sanitized error description suitable for the public coordination trajectory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number:, status:, started_at:, finished_at:, usage: Usage.new, error: nil) ⇒ Attempt

Returns a new instance of Attempt.



12
13
14
# File 'lib/little_ghost/assembly_execution.rb', line 12

def initialize(number:, status:, started_at:, finished_at:, usage: Usage.new, error: nil)
  super(number:, status: status.to_sym, started_at:, finished_at:, usage:, error: error&.to_s&.freeze)
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def error
  @error
end

#finished_atObject (readonly)

Returns the value of attribute finished_at

Returns:

  • (Object)

    the current value of finished_at



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def finished_at
  @finished_at
end

#numberObject (readonly)

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def number
  @number
end

#started_atObject (readonly)

Returns the value of attribute started_at

Returns:

  • (Object)

    the current value of started_at



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def started_at
  @started_at
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def status
  @status
end

#usageObject (readonly)

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



11
12
13
# File 'lib/little_ghost/assembly_execution.rb', line 11

def usage
  @usage
end