Class: LittleGhost::Assembly::Step

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

Overview

One logical child execution in a composite assembly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, participant:, assembly_id:, assembly_kind:, status:, attempts:, usage:, parent_id: nil, predecessor_ids: [], branch_id: nil, output: nil, output_truncated: false) ⇒ Step

Returns a new instance of Step.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/little_ghost/assembly_execution.rb', line 23

def initialize(id:, participant:, assembly_id:, assembly_kind:, status:, attempts:, usage:,
  parent_id: nil, predecessor_ids: [], branch_id: nil, output: nil, output_truncated: false)
  super(
    id: id.to_s.freeze,
    parent_id: parent_id&.to_s&.freeze,
    predecessor_ids: Array(predecessor_ids).map { |value| value.to_s.freeze }.freeze,
    branch_id: branch_id&.to_s&.freeze,
    participant: participant.to_s.freeze,
    assembly_id: assembly_id.to_s.freeze,
    assembly_kind: assembly_kind.to_sym,
    status: status.to_sym,
    attempts: Array(attempts).freeze,
    usage:,
    output:,
    output_truncated: output_truncated == true
  )
end

Instance Attribute Details

#assembly_idObject (readonly)

Returns the value of attribute assembly_id

Returns:

  • (Object)

    the current value of assembly_id



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def assembly_id
  @assembly_id
end

#assembly_kindObject (readonly)

Returns the value of attribute assembly_kind

Returns:

  • (Object)

    the current value of assembly_kind



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def assembly_kind
  @assembly_kind
end

#attemptsObject (readonly)

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def attempts
  @attempts
end

#branch_idObject (readonly)

Returns the value of attribute branch_id

Returns:

  • (Object)

    the current value of branch_id



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def branch_id
  @branch_id
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def id
  @id
end

#outputObject (readonly)

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def output
  @output
end

#output_truncatedObject (readonly)

Returns the value of attribute output_truncated

Returns:

  • (Object)

    the current value of output_truncated



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def output_truncated
  @output_truncated
end

#parent_idObject (readonly)

Returns the value of attribute parent_id

Returns:

  • (Object)

    the current value of parent_id



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def parent_id
  @parent_id
end

#participantObject (readonly)

Returns the value of attribute participant

Returns:

  • (Object)

    the current value of participant



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def participant
  @participant
end

#predecessor_idsObject (readonly)

Returns the value of attribute predecessor_ids

Returns:

  • (Object)

    the current value of predecessor_ids



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def predecessor_ids
  @predecessor_ids
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def status
  @status
end

#usageObject (readonly)

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



19
20
21
# File 'lib/little_ghost/assembly_execution.rb', line 19

def usage
  @usage
end