Sha256: 7bf06d794db83e95c351101a06dce08c362ada4a46486ff705d22e867478f533

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Macosx
      class DmiBios < BaseResolver
        init_resolver

        class << self
          # :model

          private

          def post_resolve(fact_name, _options)
            @fact_list.fetch(fact_name) { read_facts }
          end

          def read_facts
            # OSX only supports the product name
            output = Facter::Core::Execution.execute('sysctl -n hw.model', logger: log)
            @fact_list[:macosx_model] = output&.strip
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facter-4.10.0 lib/facter/resolvers/macosx/dmi.rb
facter-4.9.0 lib/facter/resolvers/macosx/dmi.rb
facter-4.8.0 lib/facter/resolvers/macosx/dmi.rb
facter-4.7.1 lib/facter/resolvers/macosx/dmi.rb
facter-4.7.0 lib/facter/resolvers/macosx/dmi.rb
facter-4.6.1 lib/facter/resolvers/macosx/dmi.rb
facter-4.6.0 lib/facter/resolvers/macosx/dmi.rb