Class: Siren::Reference
- Inherits:
-
Object
- Object
- Siren::Reference
- Includes:
- Eventful
- Defined in:
- lib/siren/reference.rb
Class Method Summary collapse
Instance Method Summary collapse
- #find(root, symbols, current) ⇒ Object
-
#initialize(hash) ⇒ Reference
constructor
A new instance of Reference.
- #resolve!(root, symbols) ⇒ Object
Constructor Details
#initialize(hash) ⇒ Reference
Returns a new instance of Reference.
14 15 16 17 18 |
# File 'lib/siren/reference.rb', line 14 def initialize(hash) @query = Siren.compile_query(hash[REF_FIELD]) @@cache ||= {} @@cache[hash.__id__] = self end |
Class Method Details
.flush! ⇒ Object
6 7 8 |
# File 'lib/siren/reference.rb', line 6 def self.flush! @@cache = {} end |