Class: LittleWeasel::Services::DictionaryKillerService
- Inherits:
-
Object
- Object
- LittleWeasel::Services::DictionaryKillerService
- Includes:
- Modules::DictionaryCacheServicable, Modules::DictionaryKeyable, Modules::DictionaryMetadataServicable
- Defined in:
- lib/LittleWeasel/services/dictionary_killer_service.rb
Overview
This service removes a dictionary (Dictionary object) associated with the dictionary key from the dictionary cache along with the dictionary file reference and any metadata associated with the dictionary from the dictionary cache.
Instance Attribute Summary
Attributes included from Modules::DictionaryKeyable
Attributes included from Modules::DictionaryMetadataServicable
#dictionary_cache, #dictionary_key, #dictionary_metadata
Attributes included from Modules::DictionaryCacheServicable
#dictionary_cache, #dictionary_key
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(dictionary_key:, dictionary_cache:, dictionary_metadata:) ⇒ DictionaryKillerService
constructor
A new instance of DictionaryKillerService.
Methods included from Modules::DictionaryKeyValidatable
#validate_dictionary_key, validate_dictionary_key
Methods included from Modules::DictionaryMetadataServicable
Methods included from Modules::DictionaryMetadataValidatable
#validate_dictionary_metadata, validate_dictionary_metadata
Methods included from Modules::DictionaryCacheValidatable
#validate_dictionary_cache, validate_dictionary_cache
Methods included from Modules::DictionaryCacheServicable
Constructor Details
#initialize(dictionary_key:, dictionary_cache:, dictionary_metadata:) ⇒ DictionaryKillerService
Returns a new instance of DictionaryKillerService.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/LittleWeasel/services/dictionary_killer_service.rb', line 18 def initialize(dictionary_key:, dictionary_cache:, dictionary_metadata:) validate_dictionary_key dictionary_key: dictionary_key self.dictionary_key = dictionary_key validate_dictionary_cache dictionary_cache: dictionary_cache self.dictionary_cache = dictionary_cache dictionary_metadata: self. = end |
Instance Method Details
#execute ⇒ Object
29 30 31 32 |
# File 'lib/LittleWeasel/services/dictionary_killer_service.rb', line 29 def execute dictionary_cache_service.init .class.init dictionary_metadata: end |