Module: Idler

Extended by:
GitBranch
Defined in:
lib/idler.rb,
lib/idler/dsl.rb,
lib/idler/branch.rb,
lib/idler/errors.rb,
lib/idler/install.rb,
lib/idler/version.rb,
lib/idler/workers.rb,
lib/idler/git_branch.rb,
lib/idler/descriptions.rb

Defined Under Namespace

Modules: DSL, GitBranch, Install Classes: Branch, Descriptions, NotDetectBranchError, NotProcError, NotYetAddBranchError, NothingBranchNameError, Workers

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Methods included from GitBranch

current_branch

Class Method Details

.descriptionsObject



14
15
16
# File 'lib/idler.rb', line 14

def descriptions
  @descriptions ||= Descriptions.new
end

.run(argv = []) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/idler.rb', line 22

def run(argv = [])
  argvs = []
  argvs.push *ARGV.dup
  argvs.push *argv

  Install.copy      if argvs.include?('init')
  descriptions.info if argvs.include?('info')

  if argvs.empty?
    workers.run(current_branch)
  else
    workers.run(argvs.first) unless ['init', 'info'].include? argvs.first
  end
end

.workersObject



18
19
20
# File 'lib/idler.rb', line 18

def workers
  @workers ||= Workers.new
end