Class: Gamefic::Query::Siblings
- Defined in:
- lib/gamefic/query/siblings.rb
Overview
Query the subject’s siblings (i.e., entities with the same parent).
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
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
7 8 9 |
# File 'lib/gamefic/query/siblings.rb', line 7 def span(subject) (subject.parent&.children || []) - [subject] end |