class Gamefic::Query::Tree

Query to retrieve all of the subject's ancestors, siblings, and descendants.

Public Instance Methods

context_from(subject) click to toggle source
Calls superclass method Gamefic::Query::Family#context_from
# File lib/gamefic/query/tree.rb, line 6
def context_from(subject)
  result = super
  parent = subject.parent
  until parent.nil?
    result.unshift parent
    parent = parent.parent
  end
  result
end