Method: Git::Base#is_local_branch?

Defined in:
lib/git/base.rb

#is_local_branch?(branch) ⇒ Boolean

returns +true+ if the branch exists locally

Returns:

  • (Boolean)
[View source]

280
281
282
283
# File 'lib/git/base.rb', line 280

def is_local_branch?(branch)
  branch_names = self.branches.local.map {|b| b.name}
  branch_names.include?(branch)
end