Class: Mudguard::Infrastructure::Rake::Task

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/mudguard/infrastructure/rake/task.rb

Overview

Provides Mudguard Rake Tasks

Instance Method Summary collapse

Constructor Details

#initialize(project_dir: Dir.pwd) ⇒ Task

Returns a new instance of Task.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mudguard/infrastructure/rake/task.rb', line 14

def initialize(project_dir: Dir.pwd)
  super()

  @project_dir = project_dir

  desc "Run Mudguard"
  task(:mudguard) do
    view = Mudguard::Infrastructure::Cli::View.new
    notification = Mudguard::Infrastructure::Cli::NotificationAdapter.new(view: view)
    ok = Application.check(@project_dir, notification)
    abort unless ok
  end
end