Class: Ant::SSL::SubInventory

Inherits:
Object
  • Object
show all
Defined in:
lib/ant/ssl/inventory.rb

Instance Method Summary collapse

Constructor Details

#initialize(configs, inventory) ⇒ SubInventory

Returns a new instance of SubInventory.



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/ant/ssl/inventory.rb', line 39

def initialize(configs, inventory)
  defaults = configs['defaults']
  @parent = inventory
  @certificates = configs['certificates'].map do |cert|
    configuration = Configuration.new(
      inventory.defaults,
      defaults,
      cert
    )
    Certificate.new(configuration, inventory)
  end
end

Instance Method Details

#ca(name) ⇒ Object



56
57
58
# File 'lib/ant/ssl/inventory.rb', line 56

def ca(name)
  @certificates.find { |cert| cert.ca_name == name }
end

#create_certificates!Object



52
53
54
# File 'lib/ant/ssl/inventory.rb', line 52

def create_certificates!
  @certificates.each(&:create!)
end