Class: PuppetLibrary::Http::Cache::InMemory::Entry
- Inherits:
-
Object
- Object
- PuppetLibrary::Http::Cache::InMemory::Entry
- Defined in:
- lib/puppet_library/http/cache/in_memory.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #age_millis ⇒ Object
-
#initialize(value) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(value) ⇒ Entry
Returns a new instance of Entry.
52 53 54 55 |
# File 'lib/puppet_library/http/cache/in_memory.rb', line 52 def initialize(value) @birth = Time.now @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
50 51 52 |
# File 'lib/puppet_library/http/cache/in_memory.rb', line 50 def value @value end |
Instance Method Details
#age_millis ⇒ Object
57 58 59 60 |
# File 'lib/puppet_library/http/cache/in_memory.rb', line 57 def age_millis age_seconds = Time.now - @birth age_seconds * 1000 end |