Class: Minicron::Hub::Job

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

Instance Method Summary collapse

Instance Method Details

#nameObject

Default the name of the command to the command itself if no name is set


9
10
11
12
13
14
15
# File 'lib/minicron/hub/models/job.rb', line 9

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