Class: RailsTasker::Task::FetchService

Inherits:
Object
  • Object
show all
Includes:
Serviceable
Defined in:
lib/rails_tasker/services/task/fetch_service.rb

Instance Method Summary collapse

Methods included from Serviceable

included

Instance Method Details

#callObject



12
13
14
15
16
17
18
# File 'lib/rails_tasker/services/task/fetch_service.rb', line 12

def call
  Dir[Task::FILE_LOCATION].map do |filename|
    TaskFile.new(filename: filename)
  end.select do |task|
    !task.timestamp.empty?
  end.sort_by { |task| task.timestamp.to_i }
end