module Buildr::Run

Public Class Methods

runners() click to toggle source
# File lib/buildr/run.rb, line 21
def runners
  @runners ||= []
end
select(lang)
Alias for: select_by_lang
select_by_lang(lang) click to toggle source
# File lib/buildr/run.rb, line 25
def select_by_lang(lang)
  fail 'Unable to define run task for nil language' if lang.nil?
  runners.detect { |e| e.languages.nil? ? false : e.languages.include?(lang.to_sym) }
end
Also aliased as: select
select_by_name(name) click to toggle source
# File lib/buildr/run.rb, line 32
def select_by_name(name)
  fail 'Unable to define run task for nil' if name.nil?
  runners.detect { |e| e.to_sym == name.to_sym }
end

Public Instance Methods

run(&block) → RunTask click to toggle source

This method returns the project’s run task. It also accepts a block to be executed when the run task is invoked.

# File lib/buildr/run.rb, line 184
def run(&block)
  task('run').tap do |t|
    t.enhance &block if block
  end
end