Class: AridCache::CacheProxy::CachedResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/arid_cache/cache_proxy.rb

Overview

AridCache::CacheProxy::CachedResult

This struct is stored in the cache and stores information about a collection of ActiveRecords.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



12
13
14
# File 'lib/arid_cache/cache_proxy.rb', line 12

def count
  @count
end

#idsObject

Returns the value of attribute ids

Returns:

  • (Object)

    the current value of ids



12
13
14
# File 'lib/arid_cache/cache_proxy.rb', line 12

def ids
  @ids
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



12
13
14
# File 'lib/arid_cache/cache_proxy.rb', line 12

def klass
  @klass
end

Instance Method Details

#has_count?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/arid_cache/cache_proxy.rb', line 13

def has_count?
  !count.nil?
end

#has_ids?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/arid_cache/cache_proxy.rb', line 17

def has_ids?
  !ids.nil?
end