Class: RubyYacht::WebServer
- Inherits:
-
Object
- Object
- RubyYacht::WebServer
- Defined in:
- lib/ruby_yacht/dsl/web_server.rb
Overview
This class models a web server that's part of the local system.
See RubyYacht::WebServer::DSL for information on configuring the server.
Defined Under Namespace
Classes: DSL
Instance Attribute Summary collapse
-
#domain ⇒ Object
The domain that this web server listens on.
-
#name ⇒ Object
The name of the server.
-
#port ⇒ Object
The port that this web server listens on.
-
#server_type ⇒ Object
The name of the web server plugin for this server.
Instance Method Summary collapse
-
#container_name ⇒ Object
This method gets the name of the image / container that this server will run in.
-
#project ⇒ Object
The project that includes this web server.
Instance Attribute Details
#domain ⇒ Object
The domain that this web server listens on.
10 11 12 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 10 def domain @domain end |
#name ⇒ Object
The name of the server
7 8 9 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 7 def name @name end |
#port ⇒ Object
The port that this web server listens on.
13 14 15 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 13 def port @port end |
#server_type ⇒ Object
The name of the web server plugin for this server.
16 17 18 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 16 def server_type @server_type end |
Instance Method Details
#container_name ⇒ Object
This method gets the name of the image / container that this server will run in.
25 26 27 28 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 25 def container_name project = self.project return "#{project.system_prefix}-#{self.name}" end |
#project ⇒ Object
The project that includes this web server.
19 20 21 |
# File 'lib/ruby_yacht/dsl/web_server.rb', line 19 def project RubyYacht.configuration.projects.find { |project| project.web_servers.include?(self) } end |