Module: BranchFactory
Instance Method Summary collapse
-
#find(name) ⇒ Object
ブランチ名をもとに、通常/detachedブランチどちらかを判断し、返す.
Instance Method Details
#find(name) ⇒ Object
ブランチ名をもとに、通常/detachedブランチどちらかを判断し、返す
11 12 13 14 15 16 17 18 19 |
# File 'lib/git/stash/sclib/branch.rb', line 11 def find(name) if Cmd::branchExist? name Branch.new name elsif Cmd::branchRefExist? name DetachBranch.new name else nil end end |