lib/cfa/augeas_parser/keys_cache.rb
# initialize cache from passed Augeas object
# @param aug [::Augeas]
# @param prefix [String] Augeas path for which cache should be created
initialize cache from passed Augeas object
initialize cache from passed Augeas object
def assign_matches(matches, cache)
      matches.each do |match|
        split_index = match.rindex("/")
        prefix = match[0..(split_index - 1)]
        key = match[(split_index + 1)..-1]
        cache[prefix] ||= []
        cache[prefix] << key
      end
    end
def assign_matches ( matches , cache ) matches . each do | match | split_index = match . rindex ( "/" ) prefix = match [ 0 .. ( split_index - 1 ) ] key = match [ ( split_index + 1 ) .. - 1 ] cache [ prefix ] ||= [ ] cache [ prefix ] << key end end
initialize cache from passed Augeas object
initialize cache from passed Augeas object
matches
<not_specific>
cache
<not_specific>
<not_specific>
None
prefix
<not_specific>
Augeas path for which cache should be created
Augeas path for which cache should be created