Method: Inspec::ProfileContext#load

Defined in:
lib/inspec/profile_context.rb

#load(content, source = nil, line = nil) ⇒ Object



59
60
61
62
63
64
65
66
67
68
# File 'lib/inspec/profile_context.rb', line 59

def load(content, source = nil, line = nil)
  @current_load = { file: source }
  if content.is_a? Proc
    @profile_context.instance_eval(&content)
  elsif source.nil? && line.nil?
    @profile_context.instance_eval(content)
  else
    @profile_context.instance_eval(content, source || 'unknown', line || 1)
  end
end