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.



39
40
41
42
# File 'lib/shared_infrastructure/nginx/location.rb', line 39

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.



50
51
52
# File 'lib/shared_infrastructure/nginx/location.rb', line 50

def certificate_domain
  @certificate_domain
end

#locationObject (readonly)

Returns the value of attribute location.



50
51
52
# File 'lib/shared_infrastructure/nginx/location.rb', line 50

def location
  @location
end

Instance Method Details

#to_s(level = 0) ⇒ Object



44
45
46
47
48
# File 'lib/shared_infrastructure/nginx/location.rb', line 44

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