Class: RobotLab::To::IterationResult

Inherits:
Data
  • Object
show all
Defined in:
lib/robot_lab/to/iteration_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#key_changesObject (readonly)

Returns the value of attribute key_changes

Returns:

  • (Object)

    the current value of key_changes



5
6
7
# File 'lib/robot_lab/to/iteration_result.rb', line 5

def key_changes
  @key_changes
end

#key_learningsObject (readonly)

Returns the value of attribute key_learnings

Returns:

  • (Object)

    the current value of key_learnings



5
6
7
# File 'lib/robot_lab/to/iteration_result.rb', line 5

def key_learnings
  @key_learnings
end

#should_fully_stopObject (readonly)

Returns the value of attribute should_fully_stop

Returns:

  • (Object)

    the current value of should_fully_stop



5
6
7
# File 'lib/robot_lab/to/iteration_result.rb', line 5

def should_fully_stop
  @should_fully_stop
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



5
6
7
# File 'lib/robot_lab/to/iteration_result.rb', line 5

def success
  @success
end

#summaryObject (readonly)

Returns the value of attribute summary

Returns:

  • (Object)

    the current value of summary



5
6
7
# File 'lib/robot_lab/to/iteration_result.rb', line 5

def summary
  @summary
end

Class Method Details

.no_stop_when(success:, summary:, key_changes: [], key_learnings: []) ⇒ Object

Used when --stop-when is not configured



16
17
18
19
20
# File 'lib/robot_lab/to/iteration_result.rb', line 16

def self.no_stop_when(success:, summary:, key_changes: [], key_learnings: [])
  new(success: success, summary: summary,
      key_changes: key_changes, key_learnings: key_learnings,
      should_fully_stop: nil)
end

.not_submittedObject

Sentinel result when the robot returns without calling submit_iteration_result



23
24
25
26
# File 'lib/robot_lab/to/iteration_result.rb', line 23

def self.
  new(success: false, summary: "Robot did not call submit_iteration_result",
      key_changes: [], key_learnings: [], should_fully_stop: nil)
end

Instance Method Details

#stop?Boolean

Returns:

  • (Boolean)


13
# File 'lib/robot_lab/to/iteration_result.rb', line 13

def stop?    = !!should_fully_stop

#success?Boolean

Returns:

  • (Boolean)


12
# File 'lib/robot_lab/to/iteration_result.rb', line 12

def success? = success