Class: Localer::RakeTask

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

Overview

Defines a Rake task for running Localer. The simplest use of it goes something like:

Localer::Rakeask.new

This will define a task named localer described as ‘Run Localer’.

Instance Method Summary collapse

Constructor Details

#initialize(name = :localer, *args) ⇒ RakeTask

Returns a new instance of RakeTask.



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

def initialize(name = :localer, *args)
  @name = name
  desc 'Run Localer'
  task(name, *args) do |_, _task_args|
    sh('localer check') do |ok, res|
      exit res.exitstatus unless ok
    end
  end
end