Class: Cheese::Nginx::Domain
- Inherits:
-
Object
- Object
- Cheese::Nginx::Domain
- Defined in:
- lib/web/domain.rb
Overview
Represents an nginx domain, which encompasses the vhost and proxies
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#vhost ⇒ Object
readonly
Returns the value of attribute vhost.
Instance Method Summary collapse
-
#initialize(vhost, proxy) ⇒ Domain
constructor
A new instance of Domain.
- #remove ⇒ Object
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
#host ⇒ Object (readonly)
Returns the value of attribute host.
7 8 9 |
# File 'lib/web/domain.rb', line 7 def host @host end |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
7 8 9 |
# File 'lib/web/domain.rb', line 7 def proxy @proxy end |
#vhost ⇒ Object (readonly)
Returns the value of attribute vhost.
7 8 9 |
# File 'lib/web/domain.rb', line 7 def vhost @vhost end |
Instance Method Details
#remove ⇒ Object
14 15 16 17 |
# File 'lib/web/domain.rb', line 14 def remove @vhost.remove @proxy.remove end |