Class: Dryad::Consul::HealthCheck
- Inherits:
-
Object
- Object
- Dryad::Consul::HealthCheck
- Defined in:
- lib/dryad/consul/health_check.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#deregister_critical_service_after ⇒ Object
Returns the value of attribute deregister_critical_service_after.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(duration) ⇒ HealthCheck
constructor
A new instance of HealthCheck.
Constructor Details
#initialize(duration) ⇒ HealthCheck
Returns a new instance of HealthCheck.
6 7 8 |
# File 'lib/dryad/consul/health_check.rb', line 6 def initialize(duration) @deregister_critical_service_after = "#{duration}s" end |
Instance Attribute Details
#deregister_critical_service_after ⇒ Object
Returns the value of attribute deregister_critical_service_after.
4 5 6 |
# File 'lib/dryad/consul/health_check.rb', line 4 def deregister_critical_service_after @deregister_critical_service_after end |
Instance Method Details
#attributes ⇒ Object
10 11 12 13 14 15 |
# File 'lib/dryad/consul/health_check.rb', line 10 def attributes self.instance_variables.map do |attribute| key = attribute.to_s.gsub('@', '') [key, self.instance_variable_get(attribute)] end.to_h end |