Sha256: 383b73d2e9c9288fa723327ca59bcb44797061ba3010a944fdfd72df3ce5b991

Contents?: true

Size: 680 Bytes

Versions: 4

Compression:

Stored size: 680 Bytes

Contents

require 'facter/util/partitions/linux'

module Facter::Util::Partitions
  IMPLEMENTATIONS = {
    'Linux' => Linux
  }

  module NoImplementation
    def self.list
      []
    end
  end

  def self.implementation
    IMPLEMENTATIONS[Facter.fact(:kernel).value] || NoImplementation
  end

  def self.list
    implementation.list
  end

  def self.uuid(partition)
    implementation.uuid(partition)
  end

  def self.size(partition)
    implementation.size(partition)
  end

  def self.mount(partition)
    implementation.mount(partition)
  end

  def self.filesystem(partition)
    implementation.filesystem(partition)
  end

  def self.available?
    !self.list.empty?
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facter-2.1.0 lib/facter/util/partitions.rb
facter-2.1.0-x86-mingw32 lib/facter/util/partitions.rb
facter-2.1.0-x64-mingw32 lib/facter/util/partitions.rb
facter-2.1.0-universal-darwin lib/facter/util/partitions.rb