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



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

def agent
  @agent
end

#answerObject

Returns the value of attribute answer

Returns:

  • (Object)

    the current value of answer



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

def answer
  @answer
end

#cancellationObject

Returns the value of attribute cancellation

Returns:

  • (Object)

    the current value of cancellation



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

def cancellation
  @cancellation
end

#diffObject

Returns the value of attribute diff

Returns:

  • (Object)

    the current value of diff



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

def diff
  @diff
end

#driverObject

Returns the value of attribute driver

Returns:

  • (Object)

    the current value of driver



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

def driver
  @driver
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



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

def error
  @error
end

#error_reportedObject

Returns the value of attribute error_reported

Returns:

  • (Object)

    the current value of error_reported



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

def error_reported
  @error_reported
end

#event_historyObject

Returns the value of attribute event_history

Returns:

  • (Object)

    the current value of event_history



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

def event_history
  @event_history
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



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

def label
  @label
end

#local_busy_activityObject

Returns the value of attribute local_busy_activity

Returns:

  • (Object)

    the current value of local_busy_activity



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

def local_busy_activity
  @local_busy_activity
end

#markdown_chunksObject

Returns the value of attribute markdown_chunks

Returns:

  • (Object)

    the current value of markdown_chunks



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

def markdown_chunks
  @markdown_chunks
end

#pending_questionObject

Returns the value of attribute pending_question

Returns:

  • (Object)

    the current value of pending_question



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

def pending_question
  @pending_question
end

#queued_inputsObject

Returns the value of attribute queued_inputs

Returns:

  • (Object)

    the current value of queued_inputs



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

def queued_inputs
  @queued_inputs
end

#seen_eventsObject

Returns the value of attribute seen_events

Returns:

  • (Object)

    the current value of seen_events



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

def seen_events
  @seen_events
end

#sessionObject

Returns the value of attribute session

Returns:

  • (Object)

    the current value of session



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

def session
  @session
end

#shellObject

Returns the value of attribute shell

Returns:

  • (Object)

    the current value of shell



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

def shell
  @shell
end

#snapshotObject

Returns the value of attribute snapshot

Returns:

  • (Object)

    the current value of snapshot



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

def snapshot
  @snapshot
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



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

def status
  @status
end

#steeringObject

Returns the value of attribute steering

Returns:

  • (Object)

    the current value of steering



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

def steering
  @steering
end

#stream_stateObject

Returns the value of attribute stream_state

Returns:

  • (Object)

    the current value of stream_state



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

def stream_state
  @stream_state
end

#threadObject

Returns the value of attribute thread

Returns:

  • (Object)

    the current value of thread



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

def thread
  @thread
end

#unreadObject

Returns the value of attribute unread

Returns:

  • (Object)

    the current value of unread



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

def unread
  @unread
end

Instance Method Details

#idle?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/kward/cli/tabs.rb', line 44

def idle?
  !running? && !local_busy?
end

#local_busy?Boolean

Returns:

  • (Boolean)


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

def local_busy?
  !local_busy_activity.to_s.empty?
end

#record_event(event) ⇒ Object



48
49
50
# File 'lib/kward/cli/tabs.rb', line 48

def record_event(event)
  event_history << event
end

#running?Boolean

Returns:

  • (Boolean)


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

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