Sha256: de144f2ec717593e7e79d6e88445f49f1c67f295d69fc40a8085156166b5a0a1

Contents?: true

Size: 629 Bytes

Versions: 14

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Macosx
      class DmiBios < BaseResolver
        @log = Facter::Log.new(self)
        @semaphore = Mutex.new
        @fact_list ||= {}

        class << self
          #:model

          private

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

          def read_facts
            # OSX only supports the product name
            output, _status = Open3.capture2('sysctl -n hw.model')
            @fact_list[:macosx_model] = output&.strip
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
facter-4.0.20 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.19 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.18 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.17 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.16 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.15 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.14 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.13 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.12 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.11 lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.10.pre lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.9.pre lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.8.pre lib/resolvers/macosx/dmi_resolver.rb
facter-4.0.7.pre lib/resolvers/macosx/dmi_resolver.rb