Method: Inspec::Metadata.from_file
- Defined in:
- lib/inspec/metadata.rb
.from_file(path, profile_id, logger = nil) ⇒ Object
259 260 261 262 263 264 265 266 267 |
# File 'lib/inspec/metadata.rb', line 259 def self.from_file(path, profile_id, logger = nil) unless File.file?(path) logger ||= Logger.new(nil) logger.error "Can't find metadata file #{path}" return nil end from_ref(File.basename(path), File.read(path), profile_id, logger) end |