Class: Koality::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/koality/rake_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(task_name = :koality) {|Koality.options| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:



8
9
10
11
12
# File 'lib/koality/rake_task.rb', line 8

def initialize(task_name = :koality)
  yield Koality.options if block_given?

  define_task task_name
end

Instance Method Details

#define_task(task_name) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/koality/rake_task.rb', line 14

def define_task(task_name)
  unless ::Rake.application.last_comment
    desc %(Ensures various code metrics are met)
  end

  task task_name do
    Koality.run
  end
end