Class: Agentilda::Unblocker::Outcome

Inherits:
Data
  • Object
show all
Defined in:
lib/agentilda/unblocker.rb

Overview

What became of one plan.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#afterArray<Question> (readonly)

Returns open now.

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/agentilda/unblocker.rb', line 58

Outcome = Data.define(:subject, :ok, :note, :before, :after) do
  # @return [Agentilda::Ordinal]
  def ordinal = subject.feature.ordinal

  # @return [Array<Integer>] the questions this run actually disposed of
  def folded = before.map(&:number) - after.map(&:number)

  # @return [Boolean] `blocked.md` is gone, so the plan is out of the block
  def cleared? = !subject.file?("blocked.md")

  # @return [Boolean] a `blocked.md` no program can read
  def unreadable? = subject.unreadable_block?

  # @return [Array<Question>] still open, with an answer sitting unfolded
  def waiting = after.select(&:answered)
end

#beforeArray<Question> (readonly)

Returns open before the agent ran.

Returns:

  • (Array<Question>)

    open before the agent ran



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/agentilda/unblocker.rb', line 58

Outcome = Data.define(:subject, :ok, :note, :before, :after) do
  # @return [Agentilda::Ordinal]
  def ordinal = subject.feature.ordinal

  # @return [Array<Integer>] the questions this run actually disposed of
  def folded = before.map(&:number) - after.map(&:number)

  # @return [Boolean] `blocked.md` is gone, so the plan is out of the block
  def cleared? = !subject.file?("blocked.md")

  # @return [Boolean] a `blocked.md` no program can read
  def unreadable? = subject.unreadable_block?

  # @return [Array<Question>] still open, with an answer sitting unfolded
  def waiting = after.select(&:answered)
end

#noteString (readonly)

Returns one line about how it went.

Returns:

  • (String)

    one line about how it went



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/agentilda/unblocker.rb', line 58

Outcome = Data.define(:subject, :ok, :note, :before, :after) do
  # @return [Agentilda::Ordinal]
  def ordinal = subject.feature.ordinal

  # @return [Array<Integer>] the questions this run actually disposed of
  def folded = before.map(&:number) - after.map(&:number)

  # @return [Boolean] `blocked.md` is gone, so the plan is out of the block
  def cleared? = !subject.file?("blocked.md")

  # @return [Boolean] a `blocked.md` no program can read
  def unreadable? = subject.unreadable_block?

  # @return [Array<Question>] still open, with an answer sitting unfolded
  def waiting = after.select(&:answered)
end

#okBoolean (readonly)

Returns whether the agent ran without failing.

Returns:

  • (Boolean)

    whether the agent ran without failing



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/agentilda/unblocker.rb', line 58

Outcome = Data.define(:subject, :ok, :note, :before, :after) do
  # @return [Agentilda::Ordinal]
  def ordinal = subject.feature.ordinal

  # @return [Array<Integer>] the questions this run actually disposed of
  def folded = before.map(&:number) - after.map(&:number)

  # @return [Boolean] `blocked.md` is gone, so the plan is out of the block
  def cleared? = !subject.file?("blocked.md")

  # @return [Boolean] a `blocked.md` no program can read
  def unreadable? = subject.unreadable_block?

  # @return [Array<Question>] still open, with an answer sitting unfolded
  def waiting = after.select(&:answered)
end

#subjectAgentilda::Subject (readonly)

Returns as the folder stands now.

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/agentilda/unblocker.rb', line 58

Outcome = Data.define(:subject, :ok, :note, :before, :after) do
  # @return [Agentilda::Ordinal]
  def ordinal = subject.feature.ordinal

  # @return [Array<Integer>] the questions this run actually disposed of
  def folded = before.map(&:number) - after.map(&:number)

  # @return [Boolean] `blocked.md` is gone, so the plan is out of the block
  def cleared? = !subject.file?("blocked.md")

  # @return [Boolean] a `blocked.md` no program can read
  def unreadable? = subject.unreadable_block?

  # @return [Array<Question>] still open, with an answer sitting unfolded
  def waiting = after.select(&:answered)
end

Instance Method Details

#cleared?Boolean

Returns blocked.md is gone, so the plan is out of the block.

Returns:

  • (Boolean)

    blocked.md is gone, so the plan is out of the block



66
# File 'lib/agentilda/unblocker.rb', line 66

def cleared? = !subject.file?("blocked.md")

#foldedArray<Integer>

Returns the questions this run actually disposed of.

Returns:

  • (Array<Integer>)

    the questions this run actually disposed of



63
# File 'lib/agentilda/unblocker.rb', line 63

def folded = before.map(&:number) - after.map(&:number)

#ordinalAgentilda::Ordinal

Returns:



60
# File 'lib/agentilda/unblocker.rb', line 60

def ordinal = subject.feature.ordinal

#unreadable?Boolean

Returns a blocked.md no program can read.

Returns:

  • (Boolean)

    a blocked.md no program can read



69
# File 'lib/agentilda/unblocker.rb', line 69

def unreadable? = subject.unreadable_block?

#waitingArray<Question>

Returns still open, with an answer sitting unfolded.

Returns:

  • (Array<Question>)

    still open, with an answer sitting unfolded



72
# File 'lib/agentilda/unblocker.rb', line 72

def waiting = after.select(&:answered)