Module: Tengine::Job::Structure::Tree
- Included in:
- Runtime::Vertex, Template::Vertex
- Defined in:
- lib/tengine/job/structure/tree.rb
Instance Method Summary collapse
Instance Method Details
#ancestors ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/tengine/job/structure/tree.rb', line 12 def ancestors if parent = self.parent parent.ancestors + [parent] else [] end end |
#root ⇒ Object
8 9 10 |
# File 'lib/tengine/job/structure/tree.rb', line 8 def root root? ? self : parent.root end |
#root? ⇒ Boolean
4 5 6 |
# File 'lib/tengine/job/structure/tree.rb', line 4 def root? parent.nil? end |