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