Class: Gracefully::Health
- Inherits:
-
Object
- Object
- Gracefully::Health
show all
- Defined in:
- lib/gracefully/health.rb
Defined Under Namespace
Classes: State
Instance Method Summary
collapse
Constructor Details
#initialize(args) ⇒ Health
Returns a new instance of Health.
3
4
5
|
# File 'lib/gracefully/health.rb', line 3
def initialize(args)
@state = args[:state]
end
|
Instance Method Details
#healthy? ⇒ Boolean
15
16
17
|
# File 'lib/gracefully/health.rb', line 15
def healthy?
@state.healthy?
end
|
#mark_failure ⇒ Object
11
12
13
|
# File 'lib/gracefully/health.rb', line 11
def mark_failure
@state = @state.mark_failure
end
|
#mark_success ⇒ Object
7
8
9
|
# File 'lib/gracefully/health.rb', line 7
def mark_success
@state = @state.mark_success
end
|
#unhealthy? ⇒ Boolean
19
20
21
|
# File 'lib/gracefully/health.rb', line 19
def unhealthy?
@state.unhealthy?
end
|