Module: DataMapper::Visualizer::Rake::Rails::Tasks

Included in:
GraphVizTask
Defined in:
lib/dm-visualizer/rake/rails/tasks.rb

Instance Method Summary collapse

Instance Method Details

#initialize(options = {}, &block) ⇒ Object

Disables Bundler by default.



9
10
11
# File 'lib/dm-visualizer/rake/rails/tasks.rb', line 9

def initialize(options={},&block)
  super({:bundle => false}.merge(options),&block)
end

#task(*arguments) ⇒ Object

Overrides the Rake task method to make sure every defined task depends on environment.

Parameters:

  • arguments (Array)

    The arguments of the task.



20
21
22
23
24
25
26
# File 'lib/dm-visualizer/rake/rails/tasks.rb', line 20

def task(*arguments)
  if arguments.first.kind_of?(Hash)
    super(*arguments)
  else
    super(arguments.first => :environment)
  end
end