Class: Pagy::SyncTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/pagy/tasks/sync.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource, destination, *targets) ⇒ SyncTask

Returns a new instance of SyncTask.



8
9
10
11
12
13
14
15
16
17
# File 'lib/pagy/tasks/sync.rb', line 8

def initialize(resource, destination, *targets)
  namespace :pagy do
    namespace :sync do
      desc "Sync #{resource}"
      task(resource) do
        Pagy.sync(resource, destination, *targets)
      end
    end
  end
end