class Inspec::RequireLoader
def add(path, content, ref, line)
def add(path, content, ref, line) @contents[path] = Item.new(content, ref, line, false) end
def exists?(path)
def exists?(path) @contents.key?(path) end
def initialize
def initialize @contents = {} end
def load(path)
def load(path) c = @contents[path] c.loaded = true res = [c.content, c.ref, c.line || 1] yield res if block_given? res end
def loaded?(path)
def loaded?(path) @contents[path].loaded == true end