Method: Inspec::Metadata.from_file
- Defined in:
- lib/inspec/metadata.rb
.from_file(path, profile_id, logger = nil) ⇒ Object
243 244 245 246 247 248 249 250 251 |
# File 'lib/inspec/metadata.rb', line 243 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 |