Class: Puma::Plugin::AutoCert::ConfigLookup

Inherits:
Struct
  • Object
show all
Defined in:
lib/puma/plugin/auto_cert.rb

Overview

puma.rb > app framework config > ENV

Instance Method Summary collapse

Instance Method Details

#all(key, puma: :"acme_#{key}", env: puma.upcase) ⇒ Object



115
116
117
118
119
# File 'lib/puma/plugin/auto_cert.rb', line 115

def all(key, puma: :"acme_#{key}", env: puma.upcase)
  values = []
  lookup(key, puma: puma, env: env) { |val| values << val }
  values
end

#first(key, puma: :"acme_#{key}", env: puma.upcase.to_s) ⇒ Object



110
111
112
113
# File 'lib/puma/plugin/auto_cert.rb', line 110

def first(key, puma: :"acme_#{key}", env: puma.upcase.to_s)
  lookup(key, puma: puma, env: env) { |val| return val }
  nil
end