class Inspec::RuntimeProfile
Attributes
files[R]
Public Class Methods
new(profile)
click to toggle source
# File lib/inspec/runtime_profile.rb, line 7 def initialize(profile) @src = profile.source_reader @files = @src.data_files.keys.map do |k| k.sub("files" + File::SEPARATOR, "") end end
Public Instance Methods
file(name)
click to toggle source
Retrieve a profile file's contents
@param name [String] the name of the file @return [String] contents of the file of RuntimeError if missing
# File lib/inspec/runtime_profile.rb, line 18 def file(name) @src.data_files[File.join("files", name)] || raise("Cannot find file #{name} in profile.") end