Class: ForemanMaintain::Utils::Disk::IO::FileSystem

Inherits:
Object
  • Object
show all
Includes:
Concerns::SystemHelpers
Defined in:
lib/foreman_maintain/utils/disk/io/file_system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::SystemHelpers

#check_min_version, #clean_all_packages, #downstream_installation?, #execute, #execute!, #execute?, #file_exists?, #find_package, #hostname, included, #package_version, #packages_action, #parse_csv, #parse_json, #rpm_version, #server?, #shellescape, #smart_proxy?, #version

Methods included from Concerns::Logger

#logger

Constructor Details

#initialize(dir, name = '') ⇒ FileSystem

Returns a new instance of FileSystem.



10
11
12
13
# File 'lib/foreman_maintain/utils/disk/io/file_system.rb', line 10

def initialize(dir, name = '')
  @dir = dir
  @name = name
end

Instance Attribute Details

#dirObject

Returns the value of attribute dir.



8
9
10
# File 'lib/foreman_maintain/utils/disk/io/file_system.rb', line 8

def dir
  @dir
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/foreman_maintain/utils/disk/io/file_system.rb', line 8

def name
  @name
end

Instance Method Details

#read_speedObject



15
16
17
# File 'lib/foreman_maintain/utils/disk/io/file_system.rb', line 15

def read_speed
  @read_speed ||= convert_kb_to_mb(fio)
end

#unitObject



19
20
21
# File 'lib/foreman_maintain/utils/disk/io/file_system.rb', line 19

def unit
  @unit ||= 'MB/sec'
end