Skip to content
Kward Search API index

Class: Kward::CLI::Tabs::TabRuntime

Inherits:
Struct
  • Object
show all
Defined in:
lib/kward/cli/tabs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#agentObject

Returns the value of attribute agent

Returns:

  • (Object)

    the current value of agent



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def agent
  @agent
end

#answerObject

Returns the value of attribute answer

Returns:

  • (Object)

    the current value of answer



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def answer
  @answer
end

#cancellationObject

Returns the value of attribute cancellation

Returns:

  • (Object)

    the current value of cancellation



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def cancellation
  @cancellation
end

#diffObject

Returns the value of attribute diff

Returns:

  • (Object)

    the current value of diff



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def diff
  @diff
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def error
  @error
end

#error_reportedObject

Returns the value of attribute error_reported

Returns:

  • (Object)

    the current value of error_reported



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def error_reported
  @error_reported
end

#event_historyObject

Returns the value of attribute event_history

Returns:

  • (Object)

    the current value of event_history



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def event_history
  @event_history
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def label
  @label
end

#markdown_chunksObject

Returns the value of attribute markdown_chunks

Returns:

  • (Object)

    the current value of markdown_chunks



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def markdown_chunks
  @markdown_chunks
end

#pending_questionObject

Returns the value of attribute pending_question

Returns:

  • (Object)

    the current value of pending_question



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def pending_question
  @pending_question
end

#queued_inputsObject

Returns the value of attribute queued_inputs

Returns:

  • (Object)

    the current value of queued_inputs



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def queued_inputs
  @queued_inputs
end

#seen_eventsObject

Returns the value of attribute seen_events

Returns:

  • (Object)

    the current value of seen_events



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def seen_events
  @seen_events
end

#sessionObject

Returns the value of attribute session

Returns:

  • (Object)

    the current value of session



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def session
  @session
end

#shellObject

Returns the value of attribute shell

Returns:

  • (Object)

    the current value of shell



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def shell
  @shell
end

#snapshotObject

Returns the value of attribute snapshot

Returns:

  • (Object)

    the current value of snapshot



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def snapshot
  @snapshot
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def status
  @status
end

#steeringObject

Returns the value of attribute steering

Returns:

  • (Object)

    the current value of steering



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def steering
  @steering
end

#stream_stateObject

Returns the value of attribute stream_state

Returns:

  • (Object)

    the current value of stream_state



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def stream_state
  @stream_state
end

#threadObject

Returns the value of attribute thread

Returns:

  • (Object)

    the current value of thread



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def thread
  @thread
end

#unreadObject

Returns the value of attribute unread

Returns:

  • (Object)

    the current value of unread



10
11
12
# File 'lib/kward/cli/tabs.rb', line 10

def unread
  @unread
end

Instance Method Details

#idle?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/kward/cli/tabs.rb', line 37

def idle?
  !running?
end

#record_event(event) ⇒ Object



41
42
43
# File 'lib/kward/cli/tabs.rb', line 41

def record_event(event)
  event_history << event
end

#running?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/kward/cli/tabs.rb', line 33

def running?
  %w[queued running waiting_for_question].include?(status.to_s)
end