Module: AppleData

Defined in:
lib/apple_data.rb,
lib/apple_data/ipsw.rb,
lib/apple_data/io_reg.rb,
lib/apple_data/keybag.rb,
lib/apple_data/version.rb,
lib/apple_data/lockdown.rb,
lib/apple_data/data_file.rb,
lib/apple_data/schema_base.rb,
lib/apple_data/models/img4/tag.rb,
lib/apple_data/models/metadata.rb,
lib/apple_data/factory_data_reset.rb,
lib/apple_data/models/img4/object.rb,
lib/apple_data/models/img4/property.rb,
lib/apple_data/dsl/data_file_definition.rb,
lib/apple_data/dsl/collection_definition.rb

Overview

typed: true frozen_string_literal: true

Defined Under Namespace

Modules: DSL, Models Classes: DataFile, FactoryDataReset, IOReg, IPSW, Keybag, Lockdown, SchemaBase

Constant Summary collapse

LOADER =
Zeitwerk::Loader.new.tap do |loader|
  loader.push_dir(__dir__)
  loader.tag = 'apple-data'
  loader.inflector.tap do |inflector|
    inflector.inflect 'dsl' => 'DSL'
    inflector.inflect 'img4' => 'IMG4'
    inflector.inflect 'pki' => 'PKI'
  end
  loader.setup

  loader.eager_load_dir(File.join(__dir__, 'apple_data/schemas'))
end
DEFAULT_APPLE_DATA_SHARE =
File.join(File.dirname(__FILE__), '../share/')
VERSION =
'1.0.654'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.data_locationObject



33
34
35
# File 'lib/apple_data.rb', line 33

def self.data_location
  @apple_data || AppleData::DEFAULT_APPLE_DATA_SHARE
end

.data_location=(location) ⇒ Object



29
30
31
# File 'lib/apple_data.rb', line 29

def self.data_location=(location)
  @apple_data = location
end

Instance Method Details

#get_data(file) ⇒ Object



25
26
27
# File 'lib/apple_data.rb', line 25

def get_data(file)
  YAML.load_file(File.join(@apple_data, file))
end