Method: Git::Base#is_branch?

Defined in:
lib/git/base.rb

#is_branch?(branch) ⇒ Boolean

returns +true+ if the branch exists

Returns:

  • (Boolean)
[View source]

292
293
294
295
# File 'lib/git/base.rb', line 292

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