Class: Installation::Unmounter::Mount

Inherits:
Object
  • Object
show all
Defined in:
src/lib/installation/unmounter.rb

Overview

Helper class to represent one mount, i.e. one entry in /proc/mounts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device, mount_path, fs_type = "", mount_opt = "") ⇒ Mount

Returns a new instance of Mount.


56
57
58
59
60
61
# File 'src/lib/installation/unmounter.rb', line 56

def initialize(device, mount_path, fs_type = "", mount_opt = "")
  @device = device
  @mount_path = mount_path
  @fs_type = fs_type
  @mount_opt = mount_opt
end

Instance Attribute Details

#deviceObject (readonly)

Returns the value of attribute device.


54
55
56
# File 'src/lib/installation/unmounter.rb', line 54

def device
  @device
end

#fs_typeObject (readonly)

Returns the value of attribute fs_type.


54
55
56
# File 'src/lib/installation/unmounter.rb', line 54

def fs_type
  @fs_type
end

#mount_optObject (readonly)

Returns the value of attribute mount_opt.


54
55
56
# File 'src/lib/installation/unmounter.rb', line 54

def mount_opt
  @mount_opt
end

#mount_pathObject (readonly)

Returns the value of attribute mount_path.


54
55
56
# File 'src/lib/installation/unmounter.rb', line 54

def mount_path
  @mount_path
end

Instance Method Details

#to_sObject

Format this mount as a string for logging.


65
66
67
# File 'src/lib/installation/unmounter.rb', line 65

def to_s
  "<Mount #{@device} -> #{@mount_path} type #{@fs_type}>"
end