class GitCompound::Task::Task

Debug messages for Task

Base abstract class for task

Attributes

name[R]

Public Class Methods

new(name, manifest, &block) click to toggle source
# File lib/git_compound/task/task.rb, line 10
def initialize(name, manifest, &block)
  raise GitCompoundError,
        "Block not given for task `#{name}`" unless block

  @name       = name
  @manifest   = manifest
  @block      = block
end

Public Instance Methods

execute() click to toggle source
# File lib/git_compound/task/task.rb, line 19
def execute
  raise NotImplementedError
end

Private Instance Methods

execute_on(directory, component) click to toggle source
# File lib/git_compound/task/task.rb, line 25
def execute_on(directory, component)
  path = Pathname.new(directory).expand_path.to_s
  @block.call(path, component)
end