class ExampleResource
Attributes
path[R]
Public Class Methods
new(alternate_path = nil)
click to toggle source
# File lib/templates/resource_pack/libraries/example.rb, line 4 def initialize(alternate_path = nil) @path = alternate_path || default_path end
Public Instance Methods
default_path()
click to toggle source
# File lib/templates/resource_pack/libraries/example.rb, line 8 def default_path if inspec.os.windows? 'C:\example\bin\example.bat' else '/usr/bin/example' end end
version()
click to toggle source
# File lib/templates/resource_pack/libraries/example.rb, line 18 def version raw_result = inspec.command("#{path} --version").stdout raw_result.split.first end