Class: Health

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHealth


4
5
6
7
8
# File 'app/models/health.rb', line 4

def initialize
  @status, @message = :ok, []
  @details = { vm_stas: RubyVM.stat }
  check
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details


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

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message


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

def message
  @message
end

#statusObject (readonly)

Returns the value of attribute status


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

def status
  @status
end

Instance Method Details

#checkObject


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

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