Class: RubyYacht::WebServer

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#domainObject

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

#nameObject

The name of the server



7
8
9
# File 'lib/ruby_yacht/dsl/web_server.rb', line 7

def name
  @name
end

#portObject

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_typeObject

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_nameObject

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

#projectObject

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