Class: Installation::Unmounter::Mount
- Inherits:
-
Object
- Object
- Installation::Unmounter::Mount
- 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
-
#device ⇒ Object
readonly
Returns the value of attribute device.
-
#fs_type ⇒ Object
readonly
Returns the value of attribute fs_type.
-
#mount_opt ⇒ Object
readonly
Returns the value of attribute mount_opt.
-
#mount_path ⇒ Object
readonly
Returns the value of attribute mount_path.
Instance Method Summary collapse
-
#initialize(device, mount_path, fs_type = "", mount_opt = "") ⇒ Mount
constructor
A new instance of Mount.
-
#to_s ⇒ Object
Format this mount as a string for logging.
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
#device ⇒ Object (readonly)
Returns the value of attribute device.
54 55 56 |
# File 'src/lib/installation/unmounter.rb', line 54 def device @device end |
#fs_type ⇒ Object (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_opt ⇒ Object (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_path ⇒ Object (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_s ⇒ Object
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 |