Class: Health
- Inherits:
-
Object
- Object
- Health
- Defined in:
- app/models/health.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize ⇒ Health
constructor
A new instance of Health.
Constructor Details
#initialize ⇒ Health
Returns a new instance of Health.
5 6 7 8 9 |
# File 'app/models/health.rb', line 5 def initialize @status, @message = :ok, [] @details = { vm_stas: RubyVM.stat } check end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
3 4 5 |
# File 'app/models/health.rb', line 3 def details @details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'app/models/health.rb', line 3 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'app/models/health.rb', line 3 def status @status end |
Instance Method Details
#check ⇒ Object
11 12 13 |
# File 'app/models/health.rb', line 11 def check @message << 'No problems detected.' if status == :ok end |