module Rake::Sh::Command
Public Class Methods
[](name)
click to toggle source
# File lib/rake/sh/command.rb, line 27 def [](name) commands[name.to_sym] end
command_names()
click to toggle source
# File lib/rake/sh/command.rb, line 23 def command_names commands.keys end
commands()
click to toggle source
# File lib/rake/sh/command.rb, line 5 def commands @commands ||= {} end
define(*names, &block)
click to toggle source
# File lib/rake/sh/command.rb, line 9 def define(*names, &block) names.each do |name| commands[name.to_sym] = block end end
find(line)
click to toggle source
# File lib/rake/sh/command.rb, line 15 def find(line) if name = line.split(/\s+/, 2)[0] commands[name.to_sym] else nil end end