Class: Ant::SSL::SubInventory
- Inherits:
-
Object
- Object
- Ant::SSL::SubInventory
- Defined in:
- lib/ant/ssl/inventory.rb
Instance Method Summary collapse
- #ca(name) ⇒ Object
- #create_certificates! ⇒ Object
-
#initialize(configs, inventory) ⇒ SubInventory
constructor
A new instance of SubInventory.
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 |