Sha256: 735c63d8fc6af95d288c2beb2112fd153364cae7319979d6844b216ad4afadd1

Contents?: true

Size: 278 Bytes

Versions: 6

Compression:

Stored size: 278 Bytes

Contents

require 'hashie'

module Hackmac
  class IOReg
    include Hackmac::Plist

    def initialize(key:)
      plist *(%w[ioreg -a -p IOService -r -k ] << key)
      @plist.extend Hashie::Extensions::DeepFind
      @plist = @plist.deep_find_all(key).max_by(&:size)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hackmac-1.8.0 lib/hackmac/ioreg.rb
hackmac-1.7.1 lib/hackmac/ioreg.rb
hackmac-1.7.0 lib/hackmac/ioreg.rb
hackmac-1.6.1 lib/hackmac/ioreg.rb
hackmac-1.6.0 lib/hackmac/ioreg.rb
hackmac-1.5.1 lib/hackmac/ioreg.rb