Class: Scry::Tasks

Inherits:
Object
  • Object
show all
Extended by:
Rake::DSL
Defined in:
lib/scry/tasks.rb

Class Method Summary collapse

Class Method Details

.install_tasksObject

Creates rake tasks that can be ran from the gem.

Add this to your Rakefile

require "scry/tasks"
Scry::Tasks.install_tasks


17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/scry/tasks.rb', line 17

def self.install_tasks
  namespace :scry do
    desc "Scrape the configured url for course data"
    task :scrape do
      mkdir_p Scry.default_dir
      Scry.scrape
    end

    desc "Completely delete all downloaded files"
    task :clean do
      rm_rf Scry.default_dir
    end
  end
end