Class: GitCompound::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/git_compound/node.rb

Overview

Abstract node class

Direct Known Subclasses

Component, Manifest

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject (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

#ancestorsObject



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

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/git_compound/node.rb', line 7

def process(*_workers)
  raise NotImplementedError
end