Method: Inspec::ProfileContext#load
- Defined in:
- lib/inspec/profile_context.rb
#load(content, source = nil, line = nil) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/inspec/profile_context.rb', line 32 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 |