22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/inspec/profile_context.rb', line 22
def initialize(profile_id, backend, conf)
if backend.nil?
raise 'ProfileContext is initiated with a backend == nil. ' \
'This is a backend error which must be fixed upstream.'
end
@profile_id = profile_id
@backend = backend
@conf = conf.dup
@rules = {}
@control_subcontexts = []
@lib_subcontexts = []
@require_loader = ::Inspec::RequireLoader.new
@attributes = []
@resource_registry = Inspec::Resource.new_registry
@library_eval_context = Inspec::LibraryEvalContext.create(@resource_registry, @require_loader)
end
|