Class: Nginx::StaticServer

Inherits:
Server
  • Object
show all
Defined in:
lib/shared_infrastructure/nginx/server.rb

Overview

Server name and site location for a static site. TODO: I don’t like the way this gets twisted when subclassing.

Instance Attribute Summary

Attributes inherited from Server

#domain_name

Instance Method Summary collapse

Methods inherited from Server

#initialize

Constructor Details

This class inherits a constructor from Nginx::Server

Instance Method Details

#to_s(level = 0) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/shared_infrastructure/nginx/server.rb', line 22

def to_s(level = 0)
  [
    super(level),
    Lines.new(
      "root #{root_directory};",
      "index index.html index.htm;"
    ).format(level)
  ].join("\n\n")
end