Class: Cachext::Multi::FindByIds

Inherits:
Object
  • Object
show all
Defined in:
lib/cachext/multi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(multi, ids, lookup) ⇒ FindByIds

Returns a new instance of FindByIds.



49
50
51
52
53
# File 'lib/cachext/multi.rb', line 49

def initialize multi, ids, lookup
  @multi = multi
  @ids = ids
  @lookup = lookup
end

Instance Attribute Details

#idsObject (readonly)

Returns the value of attribute ids.



44
45
46
# File 'lib/cachext/multi.rb', line 44

def ids
  @ids
end

#multiObject (readonly)

Returns the value of attribute multi.



44
45
46
# File 'lib/cachext/multi.rb', line 44

def multi
  @multi
end

Instance Method Details

#recordsObject



55
56
57
# File 'lib/cachext/multi.rb', line 55

def records
  fresh_cached.merge(direct).reverse_merge(stale)
end