Class: Gamefic::Query::Extended
- Includes:
- Subqueries
- Defined in:
- lib/gamefic/query/extended.rb
Overview
Query the subject’s siblings and their descendants. Unlike ‘Family`, the subject’s descendants are excluded from results.
Descendants need to be ‘accessible` to be included in the query.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Subqueries
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
13 14 15 16 17 |
# File 'lib/gamefic/query/extended.rb', line 13 def span(subject) Siblings.span(subject).flat_map do |child| [child] + subquery_accessible(child) end end |