Class: Nginx::ServerBlock
- Inherits:
-
Object
- Object
- Nginx::ServerBlock
- Defined in:
- lib/shared_infrastructure/nginx/server_block.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(upstream: nil, server: nil, listen: nil, location: nil, accel_location: nil, domain: nil) ⇒ ServerBlock
constructor
A new instance of ServerBlock.
- #to_s ⇒ Object
Constructor Details
#initialize(upstream: nil, server: nil, listen: nil, location: nil, accel_location: nil, domain: nil) ⇒ ServerBlock
Returns a new instance of ServerBlock.
7 8 9 10 11 12 13 14 |
# File 'lib/shared_infrastructure/nginx/server_block.rb', line 7 def initialize(upstream: nil, server: nil, listen: nil, location: nil, accel_location: nil, domain: nil) @accel_location = accel_location @domain = domain @listen = listen @location = Array(location) @server = server @upstream = upstream end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 |
# File 'lib/shared_infrastructure/nginx/server_block.rb', line 16 def to_s [ upstream_string, server_block_string ].compact.join("\n\n") end |