Class: Jerakia::Cache::Entry
- Inherits:
-
Object
- Object
- Jerakia::Cache::Entry
- Defined in:
- lib/jerakia/cache/entry.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key = '', _content = '') ⇒ Entry
constructor
A new instance of Entry.
- #valid? ⇒ Boolean
Constructor Details
#initialize(key = '', _content = '') ⇒ Entry
Returns a new instance of Entry.
6 7 8 |
# File 'lib/jerakia/cache/entry.rb', line 6 def initialize(key = '', _content = '') @@cache.add(key, self) end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
3 4 5 |
# File 'lib/jerakia/cache/entry.rb', line 3 def content @content end |
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/jerakia/cache/entry.rb', line 2 def key @key end |
Instance Method Details
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/jerakia/cache/entry.rb', line 10 def valid? true end |