Method: Innate::Node#possible_paths_for

Defined in:
lib/innate/node.rb

#possible_paths_for(mappings) ⇒ Array

Answer with an array of possible paths in order of significance for template lookup of the given mappings.

Parameters:

  • mappings (#map)

    An array two Arrays of inner and outer directories.

Returns:

  • (Array)

See Also:

Author:

  • manveru



867
868
869
870
871
872
# File 'lib/innate/node.rb', line 867

def possible_paths_for(mappings)
  root_mappings.map{|root|
    mappings.first.map{|inner|
      mappings.last.map{|outer|
        ::File.join(root, inner, outer, '/') }}}.flatten
end