Module: HireFire::Macro::Helpers::GoodJob

Included in:
Deprecated::GoodJob, GoodJob
Defined in:
lib/hirefire/macro/helpers/good_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/hirefire/macro/helpers/good_job.rb', line 5

def self.included(base)
  base.send(:private, :good_job_class)
end

Instance Method Details

#error_event_supported?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/hirefire/macro/helpers/good_job.rb', line 17

def error_event_supported?
  Gem::Version.new(::GoodJob::VERSION) >= Gem::Version.new("3.0.0")
end

#good_job_classObject



9
10
11
12
13
14
15
# File 'lib/hirefire/macro/helpers/good_job.rb', line 9

def good_job_class
  if Gem::Version.new(::GoodJob::VERSION) >= Gem::Version.new("4.0.0")
    ::GoodJob::Job
  else
    ::GoodJob::Execution
  end
end