Method: Inspec::Metadata.from_file
- Defined in:
- lib/inspec/metadata.rb
.from_file(path, profile_id, logger = nil) ⇒ Object
228 229 230 231 232 233 234 235 236 |
# File 'lib/inspec/metadata.rb', line 228 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 |