Class: Gamefic::Query::External
- Defined in:
- lib/gamefic/query/external.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #accept?(entity) ⇒ Boolean
- #context_from(subject) ⇒ Object
-
#initialize(objects, *args) ⇒ External
constructor
A new instance of External.
Methods inherited from Base
#ambiguous?, #include?, #precision, #resolve, #signature
Constructor Details
#initialize(objects, *args) ⇒ External
Returns a new instance of External.
4 5 6 7 |
# File 'lib/gamefic/query/external.rb', line 4 def initialize objects, *args super(*args) @objects = objects end |
Instance Method Details
#accept?(entity) ⇒ Boolean
13 14 15 |
# File 'lib/gamefic/query/external.rb', line 13 def accept?(entity) @objects.include?(entity) && super(entity) end |
#context_from(subject) ⇒ Object
9 10 11 |
# File 'lib/gamefic/query/external.rb', line 9 def context_from subject @objects end |