Class: Entrance::Agent::Acl::UrlBackendRouter
- Defined in:
- lib/entrance/agent/acl/url_backend_router.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Base
#as_digest, #comparator, #name, #value
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(params = {}) ⇒ UrlBackendRouter
constructor
A new instance of UrlBackendRouter.
Methods inherited from Base
Constructor Details
#initialize(params = {}) ⇒ UrlBackendRouter
Returns a new instance of UrlBackendRouter.
8 9 10 11 12 |
# File 'lib/entrance/agent/acl/url_backend_router.rb', line 8 def initialize params={} @url = params[:url] @backend = params[:backend] super params.merge(comparator:"hdr(host) -i",value:url,name:url) end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
7 8 9 |
# File 'lib/entrance/agent/acl/url_backend_router.rb', line 7 def backend @backend end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/entrance/agent/acl/url_backend_router.rb', line 7 def url @url end |
Instance Method Details
#apply ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/entrance/agent/acl/url_backend_router.rb', line 13 def apply @apply = [] @apply << "use_backend" @apply << backend.application @apply << condition @apply.join(" ") end |