class AcademicBenchmarks::Standards::StandardsTree

Attributes

orphans[R]
root[R]

Public Class Methods

new(root) click to toggle source
# File lib/academic_benchmarks/standards/standards_tree.rb, line 9
def initialize(root)
  @orphans = []
  @root = root
  root.rebranch_children if root.is_a?(Authority) || root.is_a?(Publication)
end

Public Instance Methods

add_orphan(orphan) click to toggle source
# File lib/academic_benchmarks/standards/standards_tree.rb, line 15
def add_orphan(orphan)
  add_orphans([orphan])
end
add_orphans(orphans) click to toggle source
# File lib/academic_benchmarks/standards/standards_tree.rb, line 19
def add_orphans(orphans)
  @orphans.concat(orphans)
end
has_orphans?() click to toggle source
# File lib/academic_benchmarks/standards/standards_tree.rb, line 23
def has_orphans?
  @orphans.present?
end