Don't meta-program if you don't need to.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-12-26 13:59:28 -08:00
parent 2490a88b9c
commit aef285a1f6

View file

@ -18,11 +18,16 @@ module Inspec::Resources
@platform = inspec.backend.platform
end
# add helper methods for easy access of properties
%w{family release arch}.each do |property|
define_method(property.to_sym) do
@platform[property]
end
def family
@platform.family
end
def release
@platform.release
end
def arch
@platform.arch
end
def families