Class: ActiveJob::Scheduler::Jobs

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/active_job/scheduler/jobs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_path) ⇒ Jobs

Returns a new instance of Jobs.



9
10
11
# File 'lib/active_job/scheduler/jobs.rb', line 9

def initialize(from_path)
  @path = from_path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/active_job/scheduler/jobs.rb', line 7

def path
  @path
end

Class Method Details

.from_yamlObject



13
14
15
# File 'lib/active_job/scheduler/jobs.rb', line 13

def self.from_yaml
  new "config/jobs.yml"
end

Instance Method Details

#eachObject



17
18
19
# File 'lib/active_job/scheduler/jobs.rb', line 17

def each
  collection.each { |job| yield job }
end