Class: Gamefic::Query::Family

Inherits:
Base
  • Object
show all
Includes:
Subqueries
Defined in:
lib/gamefic/query/family.rb

Overview

Query the subject’s ascendants, descendants, siblings, and siblings’ descendants.

Entities other than the subject’s parent and immediate children need to be ‘accessible` to be included in the query.

Instance Attribute Summary

Attributes inherited from Base

#arguments

Instance Method Summary collapse

Methods included from Subqueries

subquery_accessible

Methods inherited from Base

#accept?, #bind, #filter, #initialize, #inspect, #name, plain, #precision, #select, span

Constructor Details

This class inherits a constructor from Gamefic::Query::Base

Instance Method Details

#span(subject) ⇒ Object



14
15
16
# File 'lib/gamefic/query/family.rb', line 14

def span(subject)
  Ascendants.span(subject) + Descendants.span(subject) + match_sibling_branches(subject)
end