Class: Inspec::Resources::YumRepoLegacy

Inherits:
Yum
  • Object
show all
Defined in:
lib/resources/yum.rb

Overview

for compatability with serverspec this is deprecated syntax and will be removed in future versions

Instance Method Summary collapse

Methods inherited from Yum

#method_missing, #repo, #repos, #repositories, #to_s

Constructor Details

#initialize(name) ⇒ YumRepoLegacy

Returns a new instance of YumRepoLegacy.



162
163
164
165
# File 'lib/resources/yum.rb', line 162

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

#deprecatedObject



177
178
179
# File 'lib/resources/yum.rb', line 177

def deprecated
  warn '[DEPRECATION] `yumrepo(reponame)` is deprecated.  Please use `yum.repo(reponame)` instead.'
end

#enabled?Boolean

Returns:

  • (Boolean)


172
173
174
175
# File 'lib/resources/yum.rb', line 172

def enabled?
  deprecated
  @repository.enabled?
end

#exists?Boolean

Returns:

  • (Boolean)


167
168
169
170
# File 'lib/resources/yum.rb', line 167

def exists?
  deprecated
  @repository.exist?
end