Class: Rimc::CacheEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/rimc/cache_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cached_objectObject

Returns the value of attribute cached_object

Returns:

  • (Object)

    the current value of cached_object



2
3
4
# File 'lib/rimc/cache_entry.rb', line 2

def cached_object
  @cached_object
end

#expire_timeObject

Returns the value of attribute expire_time

Returns:

  • (Object)

    the current value of expire_time



2
3
4
# File 'lib/rimc/cache_entry.rb', line 2

def expire_time
  @expire_time
end

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)


3
4
5
6
7
# File 'lib/rimc/cache_entry.rb', line 3

def expired?
  return false if expire_time.nil?

  Time.now > expire_time
end