Class: LocalPac::Actions::GetSystemInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/local_pac/actions/get_system_information.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ GetSystemInformation

Returns a new instance of GetSystemInformation.



11
12
13
# File 'lib/local_pac/actions/get_system_information.rb', line 11

def initialize(options = {})
  @options = options
end

Instance Method Details

#runObject



15
16
17
18
19
# File 'lib/local_pac/actions/get_system_information.rb', line 15

def run
  printf( "%#{max_field_length}s | %s\n", 'Information', 'Value')
  printf( "%s + %s\n", '-' * max_field_length, '-' * 40)
  data.sort_by { |key, value| key }.each { |key, value| printf( "%#{max_field_length}s | %s\n", key, value) }
end