Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (27 sloc) 666 Bytes
module Idler
class Branch
def initialize(branch_name = nil, block = nil)
raise Idler::NotDetectBranchError if branch_name.nil?
@branch = branch_name
descriptions.add_branch branch_name
workers.add_branch branch_name
self.instance_eval &block unless block.nil?
end
def desc(description)
descriptions.add_desc @branch, description
end
def detail(note)
descriptions.add_detail @branch, note
end
def worker(&block)
workers.add_worker @branch, block
end
private
def descriptions
Idler.descriptions
end
def workers
Idler.workers
end
end
end