class Restforce::DB::Task
Restforce::DB::Task
is a lightweight interface for task classes which expose pieces of functionality to a master worker process. Each task should accept a mapping and a runner, and expose a run
method to interact with the runner’s data in some way.
Public Class Methods
new(mapping, runner = Runner.new)
click to toggle source
Public: Initialize a Restforce::DB::Task
.
mapping - A Restforce::DB::Mapping
. runner - A Restforce::DB::Runner
.
# File lib/restforce/db/task.rb, line 15 def initialize(mapping, runner = Runner.new) @mapping = mapping @runner = runner end
Public Instance Methods
run(*_)
click to toggle source
Public: Run this task. Must be overridden by subclasses.
Raises NotImplementedError. Returns nothing.
# File lib/restforce/db/task.rb, line 24 def run(*_) raise NotImplementedError end