Class: RailsServerMonitor::Server

Inherits:
ApplicationRecord show all
Defined in:
app/models/rails_server_monitor/server.rb

Instance Method Summary collapse

Instance Method Details

#display_nameObject



25
26
27
# File 'app/models/rails_server_monitor/server.rb', line 25

def display_name
  @display_name ||= custom_name.present? ? custom_name : hostname
end

#squish_textObject



29
30
31
# File 'app/models/rails_server_monitor/server.rb', line 29

def squish_text
  self.custom_name = self.custom_name&.squish
end