Class: Gamefic::Query::Global

Inherits:
Base
  • Object
show all
Defined in:
lib/gamefic/query/global.rb

Overview

Query all the entities in the subject’s epic.

If the subject is not an actor, this query will always return an empty result.

Instance Attribute Summary

Attributes inherited from Base

#arguments

Instance Method Summary collapse

Methods inherited from Base

#accept?, #bind, #filter, #initialize, #inspect, #name, plain, #select, span

Constructor Details

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

Instance Method Details

#precisionObject



17
18
19
# File 'lib/gamefic/query/global.rb', line 17

def precision
  @precision ||= super - 2000
end

#span(subject) ⇒ Object



11
12
13
14
15
# File 'lib/gamefic/query/global.rb', line 11

def span(subject)
  return [] unless subject.is_a?(Active)

  subject.narratives.entities
end