Class: Gitit::GitBranch
- Inherits:
-
Object
- Object
- Gitit::GitBranch
- Includes:
- GitExecutor
- Defined in:
- lib/gitit/git_branch.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes included from GitExecutor
Instance Method Summary collapse
-
#initialize(repo, name) ⇒ GitBranch
constructor
————————————————————————- ————————————————————————-.
-
#valid? ⇒ Boolean
————————————————————————- ————————————————————————-.
Methods included from GitExecutor
Constructor Details
#initialize(repo, name) ⇒ GitBranch
14 15 16 17 |
# File 'lib/gitit/git_branch.rb', line 14 def initialize(repo, name) @repo = repo @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/gitit/git_branch.rb', line 10 def name @name end |
Instance Method Details
#valid? ⇒ Boolean
21 22 23 24 |
# File 'lib/gitit/git_branch.rb', line 21 def valid? execute_command('diff --cached --no-ext-diff --ignore-submodules --quiet --exit-code') $?.exitstatus == 1 end |