Class: LinuxAdmin::FSTabEntry
- Inherits:
-
LinuxAdmin
- Object
- LinuxAdmin
- LinuxAdmin::FSTabEntry
- Defined in:
- lib/linux_admin/fstab.rb
Constant Summary
Constants inherited from LinuxAdmin
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
-
#dumpable ⇒ Object
Returns the value of attribute dumpable.
-
#fs_type ⇒ Object
Returns the value of attribute fs_type.
-
#fsck_order ⇒ Object
Returns the value of attribute fsck_order.
-
#mount_options ⇒ Object
Returns the value of attribute mount_options.
-
#mount_point ⇒ Object
Returns the value of attribute mount_point.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ FSTabEntry
constructor
A new instance of FSTabEntry.
Methods included from Common
Constructor Details
#initialize(args = {}) ⇒ FSTabEntry
Returns a new instance of FSTabEntry.
17 18 19 20 21 22 23 24 |
# File 'lib/linux_admin/fstab.rb', line 17 def initialize(args = {}) @device = args[:device] @mount_point = args[:mount_point] @fs_type = args[:fs_type] = args[:mount_options] @dumpable = args[:dumpable] @fsck_order = args[:fsck_order] end |
Instance Attribute Details
#device ⇒ Object
Returns the value of attribute device.
10 11 12 |
# File 'lib/linux_admin/fstab.rb', line 10 def device @device end |
#dumpable ⇒ Object
Returns the value of attribute dumpable.
14 15 16 |
# File 'lib/linux_admin/fstab.rb', line 14 def dumpable @dumpable end |
#fs_type ⇒ Object
Returns the value of attribute fs_type.
12 13 14 |
# File 'lib/linux_admin/fstab.rb', line 12 def fs_type @fs_type end |
#fsck_order ⇒ Object
Returns the value of attribute fsck_order.
15 16 17 |
# File 'lib/linux_admin/fstab.rb', line 15 def fsck_order @fsck_order end |
#mount_options ⇒ Object
Returns the value of attribute mount_options.
13 14 15 |
# File 'lib/linux_admin/fstab.rb', line 13 def end |
#mount_point ⇒ Object
Returns the value of attribute mount_point.
11 12 13 |
# File 'lib/linux_admin/fstab.rb', line 11 def mount_point @mount_point end |
Class Method Details
.from_line(fstab_line) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/linux_admin/fstab.rb', line 26 def self.from_line(fstab_line) columns = fstab_line.chomp.split FSTabEntry.new :device => columns[0], :mount_point => columns[1], :fs_type => columns[2], :mount_options => columns[3], :dumpable => columns[4].to_i, :fsck_order => columns[5].to_i end |