Class: AppleData::IORegData

Inherits:
DataFile show all
Defined in:
lib/apple_data/ioreg.rb

Overview

Data file for the IOReg data

Instance Method Summary collapse

Methods inherited from DataFile

#auto_sort?, #collection, from_path, #load_file, #save, #save!, #sort!

Constructor Details

#initializeIORegData

Returns a new instance of IORegData.



7
8
9
10
11
12
13
14
15
# File 'lib/apple_data/ioreg.rb', line 7

def initialize
  super('ioreg.yaml')

  @classes = []

  @data['classes'].each do |single_class|
    @classes << IORegClass.load_one(single_class)
  end
end

Instance Method Details

#dataObject



17
18
19
20
# File 'lib/apple_data/ioreg.rb', line 17

def data
  @data = {}
  @data['classes'] = @classes.map(&:to_h)
end