Class: Dbgrapher::RakeTask

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/dbgrapher/rake_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(task_namespace: :dbgrapher, schema_path: './db/dbgrapher.json') ⇒ RakeTask

Returns a new instance of RakeTask.



8
9
10
11
12
13
14
15
# File 'lib/dbgrapher/rake_task.rb', line 8

def initialize(task_namespace: :dbgrapher, schema_path: './db/dbgrapher.json')
  namespace(task_namespace) do
    desc "Generates dbgrapher.json"
    task gen: :environment do
      Dbgrapher::Generate.new(schema_path: schema_path).run
    end
  end
end