Class: Cheese::Nginx::Proxy
- Inherits:
-
Object
- Object
- Cheese::Nginx::Proxy
- Defined in:
- lib/web/proxy.rb
Overview
Represents the proxies to external processes that a vhost requires
Constant Summary collapse
- DELEGATED_METHODS =
[:remove]
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#ports ⇒ Object
readonly
Returns the value of attribute ports.
Instance Method Summary collapse
-
#initialize(domain, ports, config) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(domain, ports, config) ⇒ Proxy
Returns a new instance of Proxy.
11 12 13 14 |
# File 'lib/web/proxy.rb', line 11 def initialize(domain, ports, config) @domain, @ports = domain, ports.to_a @config = config end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
16 17 18 19 20 |
# File 'lib/web/proxy.rb', line 16 def method_missing(meth, *args, &block) if DELEGATED_METHODS.include? meth @config.send(meth, self) end end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/web/proxy.rb', line 7 def config @config end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
7 8 9 |
# File 'lib/web/proxy.rb', line 7 def domain @domain end |
#ports ⇒ Object (readonly)
Returns the value of attribute ports.
7 8 9 |
# File 'lib/web/proxy.rb', line 7 def ports @ports end |