Method: Inspec::RuntimeProfile#file

Defined in:
lib/inspec/runtime_profile.rb

#file(name) ⇒ String

Retrieve a profile file’s contents

Parameters:

  • name (String)

    the name of the file

Returns:

  • (String)

    contents of the file of RuntimeError if missing



21
22
23
24
# File 'lib/inspec/runtime_profile.rb', line 21

def file(name)
  @src.data_files[File.join('files', name)] ||
    raise("Cannot find file #{name} in profile.")
end