Class: RubynCode::Skills::TtlManager::Entry
- Inherits:
-
Data
- Object
- Data
- RubynCode::Skills::TtlManager::Entry
- Defined in:
- lib/rubyn_code/skills/ttl_manager.rb
Instance Attribute Summary collapse
-
#last_referenced_turn ⇒ Object
readonly
Returns the value of attribute last_referenced_turn.
-
#loaded_at_turn ⇒ Object
readonly
Returns the value of attribute loaded_at_turn.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#token_count ⇒ Object
readonly
Returns the value of attribute token_count.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
Instance Method Summary collapse
Instance Attribute Details
#last_referenced_turn ⇒ Object (readonly)
Returns the value of attribute last_referenced_turn
13 14 15 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 13 def last_referenced_turn @last_referenced_turn end |
#loaded_at_turn ⇒ Object (readonly)
Returns the value of attribute loaded_at_turn
13 14 15 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 13 def loaded_at_turn @loaded_at_turn end |
#name ⇒ Object (readonly)
Returns the value of attribute name
13 14 15 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 13 def name @name end |
#token_count ⇒ Object (readonly)
Returns the value of attribute token_count
13 14 15 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 13 def token_count @token_count end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl
13 14 15 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 13 def ttl @ttl end |
Instance Method Details
#expired?(current_turn) ⇒ Boolean
14 15 16 |
# File 'lib/rubyn_code/skills/ttl_manager.rb', line 14 def expired?(current_turn) current_turn - last_referenced_turn > ttl end |