Class: Nginx::AcmeLocation

Inherits:
Location show all
Defined in:
lib/shared_infrastructure/nginx/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(certificate_domain, location = "/.well-known") ⇒ AcmeLocation

Returns a new instance of AcmeLocation.



21
22
23
24
# File 'lib/shared_infrastructure/nginx/location.rb', line 21

def initialize(certificate_domain, location = "/.well-known")
  super(location)
  @certificate_domain = certificate_domain
end

Instance Attribute Details

#certificate_domainObject (readonly)

Returns the value of attribute certificate_domain.



32
33
34
# File 'lib/shared_infrastructure/nginx/location.rb', line 32

def certificate_domain
  @certificate_domain
end

#locationObject (readonly)

Returns the value of attribute location.



32
33
34
# File 'lib/shared_infrastructure/nginx/location.rb', line 32

def location
  @location
end

Instance Method Details

#to_s(level = 0) ⇒ Object



26
27
28
29
30
# File 'lib/shared_infrastructure/nginx/location.rb', line 26

def to_s(level = 0)
  Lines.new("location #{location} {",
    "  alias #{File.join(Nginx.root_directory(certificate_domain), ".well-known")};",
    "}").format(level)
end