diff options
| author | Nihad Abbasov <[email protected]> | 2013-05-09 17:05:59 +0500 |
|---|---|---|
| committer | Nihad Abbasov <[email protected]> | 2013-05-09 17:05:59 +0500 |
| commit | 9dd539bb157e40e78791d83a89f4727d4b10115d (patch) | |
| tree | 6e183bf6b734005dd39854ef5bb9c2d33ed549f5 /minirake | |
| parent | 14bd8ceff3ee5e82f10b4cd5a9fe6f78d00bd3bd (diff) | |
| download | mruby-9dd539bb157e40e78791d83a89f4727d4b10115d.tar.gz mruby-9dd539bb157e40e78791d83a89f4727d4b10115d.zip | |
remove unused variables
Diffstat (limited to 'minirake')
| -rwxr-xr-x | minirake | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -101,7 +101,7 @@ module MiniRake puts "Execute #{name}" if $trace self.class.enhance_with_matching_rule(name) if @actions.empty? unless $dryrun - @actions.each { |act| result = act.call(self) } + @actions.each { |act| act.call(self) } end end @@ -160,14 +160,14 @@ module MiniRake lookup(task_name).enhance([deps].flatten, &block) end - # Define a rule for synthesizing tasks. + # Define a rule for synthesizing tasks. def create_rule(args, &block) pattern, deps = resolve_args(args) pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern RULES << [pattern, deps, block] end - + # Lookup a task. Return an existing task if found, otherwise # create a task of the current type. def lookup(task_name) @@ -181,7 +181,7 @@ module MiniRake # the enhanced task or nil of no rule was found. def enhance_with_matching_rule(task_name) RULES.each do |pattern, extensions, block| - if md = pattern.match(task_name) + if pattern.match(task_name) ext = extensions.first deps = extensions[1..-1] case ext @@ -201,8 +201,8 @@ module MiniRake end nil end - - private + + private # Resolve the arguments for a task/rule. def resolve_args(args) @@ -256,7 +256,7 @@ module MiniRake # demand. def directory(dir) path = [] - Sys.split_all(dir).each do |p| + Sys.split_all(dir).each do |p| path << p FileTask.define_task(File.join(path)) do |t| Sys.makedirs(t.name) @@ -415,7 +415,7 @@ class RakeApp fail "Unknown option: #{opt}" end end - + # Read and handle the command line options. def handle_options $verbose = false |
