Class: Kitsune::Kit::Tui::State

Inherits:
Data
  • Object
show all
Defined in:
lib/kitsune/kit/tui/state.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment

Returns:

  • (Object)

    the current value of environment



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def environment
  @environment
end

#logsObject (readonly)

Returns the value of attribute logs

Returns:

  • (Object)

    the current value of logs



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def logs
  @logs
end

Returns the value of attribute modal

Returns:

  • (Object)

    the current value of modal



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def modal
  @modal
end

#notificationObject (readonly)

Returns the value of attribute notification

Returns:

  • (Object)

    the current value of notification



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def notification
  @notification
end

#operationsObject (readonly)

Returns the value of attribute operations

Returns:

  • (Object)

    the current value of operations



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def operations
  @operations
end

#resourcesObject (readonly)

Returns the value of attribute resources

Returns:

  • (Object)

    the current value of resources



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def resources
  @resources
end

#resultObject (readonly)

Returns the value of attribute result

Returns:

  • (Object)

    the current value of result



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def result
  @result
end

#runningObject (readonly)

Returns the value of attribute running

Returns:

  • (Object)

    the current value of running



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def running
  @running
end

#screenObject (readonly)

Returns the value of attribute screen

Returns:

  • (Object)

    the current value of screen



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def screen
  @screen
end

#scroll_offsetObject (readonly)

Returns the value of attribute scroll_offset

Returns:

  • (Object)

    the current value of scroll_offset



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def scroll_offset
  @scroll_offset
end

#selected_resourceObject (readonly)

Returns the value of attribute selected_resource

Returns:

  • (Object)

    the current value of selected_resource



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def selected_resource
  @selected_resource
end

#terminal_sizeObject (readonly)

Returns the value of attribute terminal_size

Returns:

  • (Object)

    the current value of terminal_size



6
7
8
# File 'lib/kitsune/kit/tui/state.rb', line 6

def terminal_size
  @terminal_size
end

Class Method Details

.initial(environment:, terminal_size: [100, 30]) ⇒ Object



10
11
12
13
14
# File 'lib/kitsune/kit/tui/state.rb', line 10

def self.initial(environment:, terminal_size: [100, 30])
  new(screen: :dashboard, environment: environment, resources: [], selected_resource: 0, operations: [],
      logs: [], modal: nil, notification: nil, running: false, terminal_size: terminal_size, result: nil,
      scroll_offset: 0)
end