Class: OsCtl::Cli::Top::Tui::Main::Module

Inherits:
Object
  • Object
show all
Defined in:
lib/osctl/cli/top/tui/main.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, header_fmts:, header_labels:, row_fmt:, row_values:, stats_cts_values:, stats_all_values:, sortable_fields: [], stats_iostat_values: nil) ⇒ Module

Returns a new instance of Module.



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/osctl/cli/top/tui/main.rb', line 17

def initialize(name:, header_fmts:, header_labels:, row_fmt:, row_values:, stats_cts_values:, stats_all_values:, sortable_fields: [], stats_iostat_values: nil)
  @name = name
  @header_fmts = header_fmts
  @header_labels = header_labels
  @row_fmt = row_fmt
  @row_values = row_values
  @sortable_fields = sortable_fields
  @stats_cts_values = stats_cts_values
  @stats_all_values = stats_all_values
  @stats_iostat_values = stats_iostat_values || proc { ['-'] * row_fmt.length }
end

Instance Attribute Details

#header_fmtsObject (readonly)

Returns the value of attribute header_fmts.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def header_fmts
  @header_fmts
end

#header_labelsObject (readonly)

Returns the value of attribute header_labels.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def header_labels
  @header_labels
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def name
  @name
end

#row_fmtObject (readonly)

Returns the value of attribute row_fmt.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def row_fmt
  @row_fmt
end

#row_valuesObject (readonly)

Returns the value of attribute row_values.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def row_values
  @row_values
end

#sortable_fieldsObject (readonly)

Returns the value of attribute sortable_fields.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def sortable_fields
  @sortable_fields
end

#stats_all_valuesObject (readonly)

Returns the value of attribute stats_all_values.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def stats_all_values
  @stats_all_values
end

#stats_cts_valuesObject (readonly)

Returns the value of attribute stats_cts_values.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def stats_cts_values
  @stats_cts_values
end

#stats_iostat_valuesObject (readonly)

Returns the value of attribute stats_iostat_values.



14
15
16
# File 'lib/osctl/cli/top/tui/main.rb', line 14

def stats_iostat_values
  @stats_iostat_values
end