Method: Inspec::ProfileContext#initialize

Defined in:
lib/inspec/profile_context.rb

#initialize(profile_id, backend, conf) ⇒ ProfileContext

Returns a new instance of ProfileContext.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/inspec/profile_context.rb', line 12

def initialize(profile_id, backend, conf)
  if backend.nil?
    fail '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 = {}

  reload_dsl
end