Class: EntityCache::Subject
- Inherits:
-
Object
- Object
- EntityCache::Subject
- Includes:
- Schema::DataStructure
- Defined in:
- lib/entity_cache/subject.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.hash_key(entity_class, specifier = nil) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/entity_cache/subject.rb', line 17 def self.hash_key(entity_class, specifier=nil) if specifier.nil? "#{entity_class}" else "#{entity_class}#{hash_key_separator}#{specifier}" end end |
.hash_key_separator ⇒ Object
25 26 27 |
# File 'lib/entity_cache/subject.rb', line 25 def self.hash_key_separator '/' end |
Instance Method Details
#hash ⇒ Object
13 14 15 |
# File 'lib/entity_cache/subject.rb', line 13 def hash hash_key.hash end |
#hash_key ⇒ Object
8 9 10 |
# File 'lib/entity_cache/subject.rb', line 8 def hash_key self.class.hash_key(entity_class, specifier) end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/entity_cache/subject.rb', line 11 def hash_key self.class.hash_key(entity_class, specifier) end |