Class: Health

Inherits:
Object
  • Object
show all
Defined in:
app/models/health.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHealth

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

#detailsObject (readonly)

Returns the value of attribute details.



3
4
5
# File 'app/models/health.rb', line 3

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'app/models/health.rb', line 3

def message
  @message
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'app/models/health.rb', line 3

def status
  @status
end

Instance Method Details

#checkObject



11
12
13
# File 'app/models/health.rb', line 11

def check
  @message << 'No problems detected.' if status == :ok
end