Class: Gamefic::Scope::Children

Inherits:
Base
  • Object
show all
Defined in:
lib/gamefic/scope/children.rb

Overview

The Children scope returns an entity’s children and all accessible descendants.

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

#initialize, matches, precision

Constructor Details

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

Instance Method Details

#matchesObject



9
10
11
12
13
# File 'lib/gamefic/scope/children.rb', line 9

def matches
  context.children.flat_map do |c|
    [c] + subquery_accessible(c)
  end
end