Class: Serverspec::Type::Package
- Defined in:
- lib/serverspec/type/package.rb
Defined Under Namespace
Classes: Version
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #inspect, #to_ary, #to_s
Constructor Details
This class inherits a constructor from Serverspec::Type::Base
Instance Method Details
#installed?(provider = nil, version = nil) ⇒ Boolean
3 4 5 6 7 8 9 10 11 |
# File 'lib/serverspec/type/package.rb', line 3 def installed?(provider=nil, version=nil) if provider.nil? @inspection = Specinfra.command.get(:check_package_is_installed, @name, version) @runner.check_package_is_installed(@name, version) else check_method = "check_package_is_installed_by_#{provider}".to_sym @runner.send(check_method, @name, version) end end |