Class: Marty::BackgroundJob::Schedule

Inherits:
Marty::Base show all
Defined in:
app/models/marty/background_job/schedule.rb

Constant Summary collapse

REGEX =
%r{\A(((\*?[\d/,\-]*)\s){3,4}(\*?([\d/,\-])*\s)(\*?([\d/,\-])*))\z}i
ALL_STATES =
%w[on off].freeze

Instance Method Summary collapse

Methods inherited from Marty::Base

get_final_attrs, get_struct_attrs, make_hash, make_openstruct, mcfly_pt

Methods inherited from ActiveRecord::Base

joins, old_joins

Instance Method Details

#job_class_validationObject



19
20
21
22
23
24
# File 'app/models/marty/background_job/schedule.rb', line 19

def job_class_validation
  job_class.constantize.respond_to?(:schedule)
rescue NameError
  errors.add(:job_class, "doesn't exist")
  false
end