require 'yaml' class GordonConfig < Inspec.resource(1) name 'gordon_config' def initialize @path = '/etc/gordon/config.yaml' @file = inspec.file(@path) return skip_resource "Can't find file \"#{@path}\"" if !@file.file? @params = YAML.load(@file.content) end def method_missing(name) @params[name.to_s] end end