Sha256: f02f559581f1af6f94e8d735de6768954b7c96d39a039d8957ceb32a1ce77a98

Contents?: true

Size: 672 Bytes

Versions: 11

Compression:

Stored size: 672 Bytes

Contents

class Puppet::Provider::A2mod < Puppet::Provider
  def self.prefetch(mods)
    instances.each do |prov|
      if mod = mods[prov.name]
        mod.provider = prov
      end
    end
  end

  def flush
    @property_hash.clear
  end

  def properties
    if @property_hash.empty?
      @property_hash = query || {:ensure => :absent}
      @property_hash[:ensure] = :absent if @property_hash.empty?
    end
    @property_hash.dup
  end

  def query
    self.class.instances.each do |mod|
      if mod.name == self.name or mod.name.downcase == self.name
        return mod.properties
      end
    end
    nil
  end

  def exists?
    properties[:ensure] != :absent
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.6.0 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.5.2 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.5.1 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.5.0 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.4.1 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.4.0 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.3.3 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.3.2 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.3.1 modules/apache/lib/puppet/provider/a2mod.rb
freighthop-0.3.0 modules/apache/lib/puppet/provider/a2mod.rb