Class: FeatureMap::Private::GlobCache
- Inherits:
-
Object
- Object
- FeatureMap::Private::GlobCache
- Defined in:
- lib/feature_map/private/glob_cache.rb
Instance Method Summary collapse
-
#initialize(raw_cache_contents) ⇒ GlobCache
constructor
A new instance of GlobCache.
- #mapper_descriptions_that_map_files(files) ⇒ Object
- #raw_cache_contents ⇒ Object
Constructor Details
#initialize(raw_cache_contents) ⇒ GlobCache
Returns a new instance of GlobCache.
7 8 9 |
# File 'lib/feature_map/private/glob_cache.rb', line 7 def initialize(raw_cache_contents) @raw_cache_contents = raw_cache_contents end |
Instance Method Details
#mapper_descriptions_that_map_files(files) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/feature_map/private/glob_cache.rb', line 15 def mapper_descriptions_that_map_files(files) files_by_mappers = files.to_h { |f| [f, Set.new([])] } .each do |file, mappers| mappers.each do |mapper| files_by_mappers[file] << mapper if files_by_mappers[file] end end files_by_mappers end |
#raw_cache_contents ⇒ Object
11 12 13 |
# File 'lib/feature_map/private/glob_cache.rb', line 11 def raw_cache_contents @raw_cache_contents end |