# File lib/puppet/ssl/certificate_authority/interface.rb, line 12 12: def apply(ca) 13: unless subjects or method == :list 14: raise ArgumentError, "You must provide hosts or :all when using %s" % method 15: end 16: 17: begin 18: if respond_to?(method) 19: return send(method, ca) 20: end 21: 22: (subjects == :all ? ca.list : subjects).each do |host| 23: ca.send(method, host) 24: end 25: rescue InterfaceError 26: raise 27: rescue => detail 28: puts detail.backtrace if Puppet[:trace] 29: Puppet.err "Could not call %s: %s" % [method, detail] 30: end 31: end