Class: Minicron::Hub::Host

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/minicron/hub/models/host.rb

Instance Method Summary collapse

Instance Method Details

#nameObject

Default the name of the host to the fqdn itself if no name is set


7
8
9
10
11
12
13
# File 'lib/minicron/hub/models/host.rb', line 7

def name
  if read_attribute(:name) == '' || read_attribute(:name).nil?
    read_attribute(:fqdn)
  else
    read_attribute(:name)
  end
end