Class: Cheese::Nginx::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/web/domain.rb

Overview

Represents an nginx domain, which encompasses the vhost and proxies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vhost, proxy) ⇒ Domain

Returns a new instance of Domain.



9
10
11
12
# File 'lib/web/domain.rb', line 9

def initialize(vhost, proxy)
  @vhost, @proxy = vhost, proxy
  @host = @vhost.domain
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



7
8
9
# File 'lib/web/domain.rb', line 7

def host
  @host
end

#proxyObject (readonly)

Returns the value of attribute proxy.



7
8
9
# File 'lib/web/domain.rb', line 7

def proxy
  @proxy
end

#vhostObject (readonly)

Returns the value of attribute vhost.



7
8
9
# File 'lib/web/domain.rb', line 7

def vhost
  @vhost
end

Instance Method Details

#removeObject



14
15
16
17
# File 'lib/web/domain.rb', line 14

def remove
  @vhost.remove
  @proxy.remove
end