Class: Inspec::Resources::YumRepoLegacy
Overview
for compatability with serverspec this is deprecated syntax and will be removed in future versions
Instance Method Summary collapse
- #deprecated ⇒ Object
- #enabled? ⇒ Boolean
- #exists? ⇒ Boolean
-
#initialize(name) ⇒ YumRepoLegacy
constructor
A new instance of YumRepoLegacy.
Methods inherited from Yum
#method_missing, #repo, #repos, #repositories, #to_s
Constructor Details
#initialize(name) ⇒ YumRepoLegacy
Returns a new instance of YumRepoLegacy.
161 162 163 164 |
# File 'lib/resources/yum.rb', line 161 def initialize(name) super() @repository = repo(name) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Inspec::Resources::Yum
Instance Method Details
#deprecated ⇒ Object
176 177 178 |
# File 'lib/resources/yum.rb', line 176 def deprecated warn '[DEPRECATION] `yumrepo(reponame)` is deprecated. Please use `yum.repo(reponame)` instead.' end |
#enabled? ⇒ Boolean
171 172 173 174 |
# File 'lib/resources/yum.rb', line 171 def enabled? deprecated @repository.enabled? end |
#exists? ⇒ Boolean
166 167 168 169 |
# File 'lib/resources/yum.rb', line 166 def exists? deprecated @repository.exist? end |