lib/gamefic/query/external.rb in gamefic-1.7.0 vs lib/gamefic/query/external.rb in gamefic-2.0.0
- old
+ new
@@ -1,14 +1,18 @@
-module Gamefic
- module Query
- class External < Base
- def initialize objects, *args
- super(*args)
- @objects = objects
- end
-
- def context_from subject
- @objects
- end
- end
- end
-end
+module Gamefic
+ module Query
+ class External < Base
+ def initialize objects, *args
+ super(*args)
+ @objects = objects
+ end
+
+ def context_from subject
+ @objects
+ end
+
+ def accept?(entity)
+ @objects.include?(entity) && super(entity)
+ end
+ end
+ end
+end