Sha256: 93c7eef7b8ccd93cfe49594abd4efdc09335e76f82d80e7d1d63852a5e7a1f21
Contents?: true
Size: 838 Bytes
Versions: 4
Compression:
Stored size: 838 Bytes
Contents
# LinuxAdmin Partition Representation # # Copyright (C) 2013 Red Hat Inc. # Licensed under the MIT License require 'fileutils' module LinuxAdmin class Partition include Mountable attr_accessor :id attr_accessor :partition_type attr_accessor :start_sector attr_accessor :end_sector attr_accessor :size attr_accessor :disk def initialize(args={}) @id = args[:id] @size = args[:size] @disk = args[:disk] @fs_type = args[:fs_type] @start_sector = args[:start_sector] @end_sector = args[:end_sector] @partition_type = args[:partition_type] end def path "#{disk.path}#{id}" end def mount(mount_point=nil) mount_point ||= "/mnt/#{disk.path.split(File::SEPARATOR).last}#{id}" super(mount_point) end end end
Version data entries
4 entries across 4 versions & 1 rubygems