Class: HttpHealthCheck::Config::Dsl
- Inherits:
-
Object
- Object
- HttpHealthCheck::Config::Dsl
- Defined in:
- lib/http_health_check/config/dsl.rb
Instance Attribute Summary collapse
-
#configured_fallback_app ⇒ Object
readonly
Returns the value of attribute configured_fallback_app.
-
#configured_logger ⇒ Object
readonly
Returns the value of attribute configured_logger.
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
- #fallback_app(handler = nil, &block) ⇒ Object
-
#initialize ⇒ Dsl
constructor
A new instance of Dsl.
- #logger(logger) ⇒ Object
- #probe(path, handler = nil, &block) ⇒ Object
Constructor Details
#initialize ⇒ Dsl
Returns a new instance of Dsl.
6 7 8 |
# File 'lib/http_health_check/config/dsl.rb', line 6 def initialize @routes = {} end |
Instance Attribute Details
#configured_fallback_app ⇒ Object (readonly)
Returns the value of attribute configured_fallback_app.
9 10 11 |
# File 'lib/http_health_check/config/dsl.rb', line 9 def configured_fallback_app @configured_fallback_app end |
#configured_logger ⇒ Object (readonly)
Returns the value of attribute configured_logger.
9 10 11 |
# File 'lib/http_health_check/config/dsl.rb', line 9 def configured_logger @configured_logger end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
9 10 11 |
# File 'lib/http_health_check/config/dsl.rb', line 9 def routes @routes end |
Instance Method Details
#fallback_app(handler = nil, &block) ⇒ Object
15 16 17 |
# File 'lib/http_health_check/config/dsl.rb', line 15 def fallback_app(handler = nil, &block) @configured_fallback_app = block_given? ? block : handler end |
#logger(logger) ⇒ Object
19 20 21 |
# File 'lib/http_health_check/config/dsl.rb', line 19 def logger(logger) @configured_logger = logger end |
#probe(path, handler = nil, &block) ⇒ Object
11 12 13 |
# File 'lib/http_health_check/config/dsl.rb', line 11 def probe(path, handler = nil, &block) @routes[path] = block_given? ? block : handler end |