Class: GitCompound::Node
- Inherits:
-
Object
- Object
- GitCompound::Node
- Defined in:
- lib/git_compound/node.rb
Overview
Abstract node class
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
Instance Attribute Details
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
5 6 7 |
# File 'lib/git_compound/node.rb', line 5 def parent @parent end |
Instance Method Details
#ancestors ⇒ Object
11 12 13 14 15 |
# File 'lib/git_compound/node.rb', line 11 def ancestors return [] if @parent.nil? || @parent.parent.nil? ancestor = @parent.parent ancestor.ancestors.dup << ancestor end |
#process(*_workers) ⇒ Object
7 8 9 |
# File 'lib/git_compound/node.rb', line 7 def process(*_workers) raise NotImplementedError end |